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
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
-
Great. Thankyou.
-
RewriteEngine On
RewriteCond %{HTTP_HOST} ^olddomain.com [NC]
RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301]RewriteCond %{HTTP_HOST} ^www.olddomain.com [NC]
RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301]Source:
http://301redirects.net/redirect-old-domain-to-new-website.php
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
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 to canonical
I'm doing some work on a website, they have a very popular product search where you enter a specific part code (6 digits) and it takes you to the product. So for example Search: 123456 Page redirected to domain.com/product/123456 With a canonical of domain.com/product/this-is-the-product-title Would it be beneficial to redirect from /product/123456 to /product/this-is-the-product-title Google seems to be indexing both versions. For some of these products a reasonable amount of links are built.
On-Page Optimization | | ThomasHarvey0 -
How should we act regarding a 404 that came from a 301?
Hi! Some time ago we changed our domain from canexel.net to canexel.es. We spent some time "cleaning" the backlinks to the ".net" domain since we had been penalized by penguin. After some time we went ahead and did a 301 from .net to .es january 15. From that date on we've noticed that webmaster tools has been detecting a really big increase oon 404 detected on our site. All this 404 come from .net pages that have been cached by google but don't exist anymore. The problem is that the 301 has made google believe that they exist also on our .es site (where of course don't exist either), and 404 have appeared from this non existing pages pinting to other non existing pages. We want to to eliminate the urls from WMT but we don't know if we should eliminate them both from the .net and .es domains or just from the .net one. We also would like to know if this would penalize our SEO. Thanks
On-Page Optimization | | Canexel0 -
Big problem with my new crawl report
I am owner of small opencart online store. I installed http://www.opencart.com/index.php?route=extension/extension/info&extension_id=6182&filter_search=seo. Today my new crawl report is awful. The number of errors is up by 520 (30 before), up with 1000 (120 before), notices up with 8000 (1000 before). I noticed that the problem is with search. There is a lot duplicate content in search only. What to do ?
On-Page Optimization | | ankali0 -
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
On-Page Optimization | | juanmiguelcr0 -
Losing Page Rank after 301 redirect from http to www
Hi Guys I have site-wide redirected all http// to www and all the category pages lost their page ranks (except home page). I would like to know if this is normal and is it one of the possible causes in losing keyword ranking?
On-Page Optimization | | ilovebodykits0 -
Depreciated content - Canononical, 301, or noindex?
I have a page that has existed on our website for many years, without ever being updated.This is what I would consider an "evergreen" content page, but it is now considered out of date and depreciated. It was never ranking high for any keyword in particular, but it is a page that has existed for many years. We have now created a more up-to-date version of the page, with much more informative content, a new URL, and of course it is SEO optimized. I am puzzled as to what I should do with my old page. Should I add a canononical link pointing it to the new updated page, or should I 301 redirect it to the new page, or should I no-index the old page? What are your thoughts and suggestions? I can give more information if needed. Thank you!!
On-Page Optimization | | jcph0 -
301 redirects / clean urls (2)
hello again! 1st i want to thank robert, istvan and everyone else for the great answers to my last question. i guess i should have been a bit more specific with the questionas i am still a bit unclear about a couple of things. i forgot to mention that we actually moved the site several months back and redirected all the "category" pages, but, i wasnt aware that the "product" pages were never redirecte! so my next questions are: at this point is it even worth redirecting those old product pages? if so, should we use the IP address as shown below or the domain as shown below ...i am guessing at the IP address. http://72.3.181.97/catalog/CanineCushionDogCouchBeds.aspx
On-Page Optimization | | k9byron
http://www.k9electronics.com/catalog/CanineCushionDogCouchBeds.aspx also, our old site was never deleted from the server. our ranking / sales dropped off by about 50% when the new site went live so im guessing this can be directly contributed to the products not being redirected / duplicate content from the 2 sites? im also guessing i need to find a new developer ..can i get a vote on that? 😉 <colgroup><col width="856"></colgroup>
| http://72.3.181.97/catalog/CanineCushionDogCouchBeds.aspx |0 -
How do I fix a 404 with a 301
I understand the need for fixing 404's but I have yet to have a serious walkthrough of how to set up a 301. From all the talk on the forums and such I'm pretty sure this is easy but I've just never done it before and I could really use a walk through. Thanks
On-Page Optimization | | BenRWoodard1