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
-
Should I redirect or add content, to 47 Pages?
We have an insurance agency website with 47 pages that have duplicate/low content warnings. What's the best way to handle this? I'm I right in thinking I have 2 options? Either add new content or redirect the page? Thanks in advance 🙂
On-Page Optimization | | laurentjb1 -
301 redirects
I am in the process of truncating many of the URLs using a plugin installed on Wordpress. The question is does google penalize or have issues with too many 301 redirects on your site. I have many many products I want to do this with. I thought I read somewhere that 301 redirects should be held to a minimum. Would appreciate any assistance
On-Page Optimization | | xinar0 -
Canonical question - Would this create some sort of crawler redirection loop?
What happens if a canonical link, links to the url with / but the main url does not have the / For example: rel="canonical" href="https://www.exampleURL.co.uk/"> Main URL - https://www.exampleURL.co.uk (without the /) 301 Redirect https://www.exampleURL.co.uk/ to https://www.exampleURL.co.uk Would this create some sort of crawler redirection loop?
On-Page Optimization | | Evosite10 -
Redirect issue
http://www.themorrisagency.co.uk/wedding-band redirects to http://www.themorrisagency.co.uk/wedding-band-cost-much-hire/ NO canonical in place. Nothing in Htaccess. I cant think where else to look to find it. If I amend it to http://www.themorrisagency.co.uk/we it still redirects. Any ideas? I have spent way too long on it now
On-Page Optimization | | agentmorris10 -
How can I redirect anything after the article url to main article?
Hello everyone, When someone visits my websites article like http://www.website.com/article-title/lol , it give to 404 page error. But when someone http://www.website.com/article-title/ , it shows the article. The word "lol" can be changed to anything. I would like that to be redirected to the main article. Example: Someone visits website.com/article-title/lol, they should be redirected to website.com/article-title/ Is it possible to do so? If yes, please tell me how. Note: I'm using WordPress Thank you
On-Page Optimization | | hakhan2011 -
301 vs. keeping identical URL
Hey everybody! I have a question pertaining to our redesign. The situation is as follows: /drug-rehab/alcohol-withdrawal-los-angeles gets a decent amount of views on out website, and we would like it to be on our redesigned site. I was curious what impact, if any, I would see given the two scenarios below. 301 to /alcohol-withdrawal make the new page /drug-rehab/alcohol-withdrawal-los-angeles as well The second situation is that there are a serious of other pages which don't seem to be of drastic benefit, which I don't feel NEED to be on the website. For example: /post-acute-alcohol-withdrawal-treatment/drug-los-angeles /rehabs-resources/drug-abuse/sub-acute-alcohol-withdrawal etc It appears to me that the content on these pages is rather similar, and I feel like they don't really say anything special. Can I 301 them to the new page? Should I let them die in the black hat inferno they were made in? Any thoughts are greatly appreciated! Thanks guys!
On-Page Optimization | | HashtagHustler0 -
301 Problem
Hi Guys, Just have a small problem with a htaccess 301 redirect. I would like to 301: www.old-domain.com & old-domain.com to www.new-domain.com. The site is exactly the same with the same directory structure so i would also like all the subpages to work. Eg: www.old-domain.com/folder/page & old-domain.com/folder/page to www.new-domain.com/folder/page Many thanks
On-Page Optimization | | MSSTORAGE0 -
Keyword cannabilization ... I just cant face 301'ing good, well aged pages
Hi Mozzers Ive read a little about your views on cannabilization and would like to run my situation by you. I have 2 pages lets say (a) and (b) that rank ok for a main keyword. However (a) desite being nice and old is not ageing well and is starting to slip a little - its getting harder to spread the link juice so Ive been thinking should I ditch page (a) and focus solely on page (b) for this keyword. Page (b) seems to be getting better serp value right now. What I find hard is that page (a) has been around a while (6 years) and I cant bring myself to 301 it assuming thats what you would normally do to avoid cannabilization. But at the end of the day its a business page and if its failing - yet could inject even more bounce into page (b) it must be worth considering. What is the best way forward here..? Im not sure how quick any transition of link juice would take ? Also what to do with the unique content on page (a)? Seems such a shame to just ditch it. Cheers fella's Morch
On-Page Optimization | | Morch0