How to do this 301 redirection
-
Hi there! I have two domains with the same content. Some guys in this forum posted that It would be convinient to do a 301 redirect from one ".com" domain to ".es" domain (my potential market). I just tried to set it up in the htaccess file but it dind't worked at all.
Something like:
redirect 301 http://wwww.domain.com http://www.domain.es
I just configure in the webmaster tools the domain www.domain.com as preferred domain insted of http://domain.comThe same with the other domain.
Any help?
many thanks
-
Hey Juan,
On the old domain have this in your .htaccess file
RewriteEngine On
RedirectMatch 301 (.*) http://www.domain.es/$1Then you may want a separate HTACCESS rule to forward all traffic without www. to use it
RewriteCond %{HTTP_HOST} !^www.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]I hope that helps, but I have a feeling I may have missed the point of the question. Let me know if I did.
- Andie
-
Try this
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
301 Redirects - Large .htaccess file question
We are moving about 5000 pages from root into different folders. We need to individually 301 each page because the are sitting at root level now: mysite.com/page.com We want to move them to: mysite.com/folder/page.html etc I dont think redirect match can works because of the different files names and folders they are being moved in to. Will 5000 entries in .htacess slow site loading? Any other suggestions how to handle?
On-Page Optimization | | leadforms0 -
Redirect Chain
Describe tu pregunta en detalle. ¡Cuanta más información proporciones, mejor! Ayuda a dar contexto a una gran respuesta. in Moz I did the analysis of my web and it tells me that I have a redirect in chain: The redirect chains often occur when several redirecting rules are accumulated, like redirecting a 'www' to a URL other than www or a page not secure to a secure page / https: Look for any recurring string that can be rewritten as a single rule. Take special care with chains 301/302 in any combination, since 302 in the mix could affect the ability of 301 to pass the value of the link. I thank you for your help in solving
On-Page Optimization | | Miguelperez0 -
301 Redirect or landing page
Hi everyone. I'm currently doing some SEO for a client, at the moment he has some landing pages which are categorised, but the category is set as a 302 redirect. I have a dilemma whether to 301 redirect to the landing page or make a page for each category. The link structure is as follows - http://examplesite.co.uk/products/fire/company-1/product/ so currently this is set as a 302 redirect - http://examplesite.co.uk/products/fire/company-1/ Do I make this page a category page and link the page to the children with some on-page optimisation or 301 redirect it?
On-Page Optimization | | Unbranded_Lee0 -
Www no longer redirects
Hi there, A while back I dropped the www from my domain. Everything redirected ok and I could still access my site using www and it would simply redirect to http://mysite This no longer seems to be occurring. I don't think I have changed anything? I don't believe I had anything in my htaccess however I am looking for some assistance in doing so. I've done a bit of reading but am not 100% confident! If anyone is interested, the url is http://cdkeyprices.com Thanks
On-Page Optimization | | MrPenguin0 -
Redoing a site - 404 redirect or 301 redirect
I'm redoing a website, should i 404 the old pages, or 301 redirect to the main page? what is better? (around 100 pages)
On-Page Optimization | | mkmedia0 -
Redirecting a Parked Domain
A client's friend has had a parked domain for over 11 years. He has done nothing with it but throw a couple of ads on it. It has some traffic, most likely from typos: the domain domain is somewhat similar to a leading search engine. But the parked domain has no content, no links, no DA. I can't see the benefit of the redirect. My client might get a little traffic -- but the parked domain has nothing to do with his niche. Am I missing something? Is there any risk involved in the redirect (beyond unqualified traffic that isn't valuable?)
On-Page Optimization | | DanielFreedman0 -
301 redirects from several sub-pages to one sub-page
Hi! I have 14 sub-pages i deleted earlier today. But ofcourse Google can still find them, and gives everyone that gives them a go a 404 error. I have come to the understading that this wil hurt the rest of my site, at least as long as Google have them indexed. These sub-pages lies in 3 different folders, and i want to redirect them to a sub-page in a folder number 4. I have already an htaccess file, but i just simply cant get it to work! It is the same file as i use for redirecting trafic from mydomain.no to www.mydomain.no, and i have tried every kind of variation i can think of with the sub-pages. Has anyone perhaps had the same problem before, or for any other reason has the solution, and can help me with how to compose the htaccess file? 🙂 You have to excuse me if i'm using the wrong terms, missing something i should have seen under water while wearing a blindfold, or i am misspelling anything. I am neither very experienced with anything surrounding seo or anything else that has with internet to do, nor am i from an englishspeaking country. Hope someone here can light up my path 🙂 Thats at least something you can say in norwegian...
On-Page Optimization | | MarieA1 -
SEOMOZ crawler ignoring redirect?
My crawl report for www.poker-coaching.net show a number of duplicate content warnings.
On-Page Optimization | | CatfishTPA
First, it shows a warning for www.poker-coaching.net and www.poker-coaching.net/, although there is a redirect in place for this, and for non-www. to www. as well. So IMO there is no duplicate content here, so why the error message?
Next, it shows a duplicate content warning for a number of pages, but when I click the number on the right, there is no info an which pages contain the duplicate content. Will this info be there later when the crawl is completed? My problem is that this is my oldest site, but since over one year it seems to have a penalty which I can't get rid of - I cannot identify the reason for the penalty. I already rebuilt the site from scratch once, but I still do not see results. If a membership at SEOMOZ would be able to help me bring this site back on track, that would already be worth one years membership fees, so I'd really be very thankful if someone could take a look at the site and give me an idea about what needs to be done here.0