Move to a new domain - How to get the redirects right?
-
Hi,
I hope that someone with good htaccess knowledge can help.
I am planning on moving my site to a new domain. I understand that I should make 301 redirects using htaccess for every URL. This is a big site so it will be impossible to not forget some of the thousands existing URLs.
Now to the question: How do I make all the URLs that is not specified in htaccess to redirect to my new root?
Thanks!
-
Oops, I forgot to update this question after I came to a conclusion. Thanks for answering!
The redirects I ended up with looks like this:
RewriteEngine on
RewriteRule ^old-product.html$ http://www.new-domain.com/new-product.html [R=301]
RewriteRule ^old-category$ http://www.new-domain.se/new-category [R=301]I tried first to write them the way you suggest but it didn't work the way I wanted it do for category pages (or folders).
And I generated an .xml sitemap for the old site first that I used as a list of all URLs to redirect to so I think I covered them all.
-
You don't actually want to do what you're asking - that would mean that no page on your site would 404 (if any missing page redirected to the root).
Better:
Redirect individual pages using:
RedirectPermanent oldpage.html newpage.html
Redirect sections using RedirectMatch or RewriteRule. Then set up a way of tracking 404 errors - either by checking your log files or by doing something like this to track them in google analytics:
http://analytics.blogspot.com/2006/09/tip-tracking-404-pages.html
Then, when you have a list of pages you missed or forgot, you can add redirections for those pages as well.
I hope that makes sense.
-
**** deleted
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
-
When creating a sub-domain, does that sub-domain automatically start with the DA of the main domain?
We have a website with a high DA and we are considering sub-folder or sub-domain. One of the great benefits of a sub-folder is that we know we get to keep the high DA, is this also the case for sub-domains? Also if you could provide any sources of information that specify this, I can't see to find anything!
Intermediate & Advanced SEO | | Saba.Elahi.M.0 -
Moving site to new domain without access to redirect from old to new. How can I do this with as little loss to SERP results as possible?
I've been hired to build a new site for a customer. They were duped by some shady characters at goglupe.com (If you can reach them, tell them they are rats--phone is disconnected, address is a comedy club on Mission in SF). Glupe owns the domain name and would not transfer or give FTP access prior to dropping off the face of the earth. The customer doesn't want to chase after them with lawyers, so we are moving on. New domain, new site with much of the same content as previous site. All that I have access to is the old wordpress site. I plan to build the new site, then remove all pages/posts from the old site. Is there anything I can do to salvage the current page 1 ranking? Obviously, the new domain will take some time to get back there. Just hoping to avoid any pitfalls or penalties if I can. If I had complete access, I would follow all the standard guidelines. But I don't. Any thoughts? Thanks! Chris
Intermediate & Advanced SEO | | c_estep_tcbguy0 -
Risks of moving a site back to an old domain
Hi Nearly 2 years ago our site was moved from a .co.uk domain to .media. Because this TLD isn't supported for DA, it's hard to measure whether linkbuilding campaigns (for example) are having a positive effect. The old site has a DA of 38 (even after 2 years of inactivity) and the new one is 1, but the new one has better Trust and Citation flow, for example. I'm now investigating whether it's worth moving back to .co.uk and I want to fully understand the risks involved. So far I know of the following potential risks: It's a lot of work so human error is a real risk Could create a redirect loop as the old site has 301 redirects in place to the new one It will take several months for metrics to recover Any thoughts on more risks, how these challenges can be overcome etc will be welcome. Or do I just set fire to the lot and create a new site with yet another 301 redirect from the .media site? What would you do?
Intermediate & Advanced SEO | | AxonnMedia0 -
301 Redirect? How to leverage the traffic on our old domain.
I've seen multiple questions about this but there's a few different answers on ways to approach it. Figured I'd personally ask for our situation. Any advice would be appreciated. We formed a new company with a new name / domain while at the same time buying an existing company in our industry. The domain and site of the company we acquired is ranking for some valuable keywords and still getting a significant amount of traffic (about half of what our new site is getting). A big downside has been, when they moved that site to a different server, something happened to where the site became uneducable so it's full of bad pricing and information. Because of that, we've had a maintenance page up for a little bit because it was generating calls to our sales team (GOOD) but the customer was having seen incredibly incorrect information (BAD) Rather than correcting those issues or figuring out why the site is un-editable, we just want to find a way where we can leverage that traffic and have them end up at our new site. Would we 301 redirect the entire domain to our new one? If we did that would the old domain still keep the majority of it's page rank?
Intermediate & Advanced SEO | | HuskyCargo1 -
Dealing with Redirects and iFrames - getting "product login" pages to rank
One of our most popular products has a very authoritative product page, which is great for marketing purposes, but not so much for current users. When current users search for "product x login" or "product x sign in", instead of getting to the login page, they see the product page - it adds a couple of clicks to their experience, which is not what we want. One of the problems is that the actual login page has barely any content, and the content that it does carry is wrapped around <iframes>. Due to political and security reasons, the web team is reluctant to make any changes to the page, and one of their arguments is that the login page actually ranks #1 for a few other products (at our company, the majority of logins originate from the same domain). </iframes> To add to the challenge - queries that do return the login page as #1 result (for some of our other products) actually do not reference the sign-in domain, but our old domain, which is now a 301 redirect to the sign-in domain. To make that clear - **Google is displaying the origin domain in SERPs, instead of displaying the destination domain. ** The question is - how do we get this popular product's login page to rank higher than the product page for "login" / "sign in" queries? I'm not even sure where we should point links to at this point - the actual sign in domain or the origin domain? I have the redirect chains and domain authority for all of the pages involved, including a few of our major competitors (who follow the same login format), and will be happy to share it privately with a Moz expert. I'd prefer not to make any more information publicly available, so please reach out via private message if you think you can help.
Intermediate & Advanced SEO | | leosaraceni0 -
301 redirects within same domain
If I 301 redirects all urls from http://domain.com/folder/keyword to http://domain.com/folder/keyword.htm Are new urls likely to keep most of link juicy from source url and maintain the rankings in SERP?
Intermediate & Advanced SEO | | Bull1350 -
Hit by Penguin, Can I move the content from the old site to a new domain and start again with the same content which is high quality
I need some advice please. My website got the unnatural links detected message and was hit by penguin.. hard. Can I move the content from the current domain to a new domain and start again or does the content need to be redone also. I will obviously turn of the old domain once its moved. The other option is to try and identify the bad links and change my anchor profile which is a hit and miss task in my opinion. Would it not be easier just to identify the good links pointing to the old domain and get those changed to point to the new domain with better anchors. thanks Warren
Intermediate & Advanced SEO | | warren0071 -
Moving External TLD To Subfolder of Corporate Domain?
Our Challenge: Our corporate site receives about 20,000 visits per week. Unfortunately, nearly half of those visitors are "looking" for a link we provide in our navigation link found on our homepage that takes them to our “Employee" focused site which resides on a separate TLD. Because so much of the traffic to our corporate site lands on our homepage only as a stepping stone en route to the "Employee" site, the bounce rate, time on site and Average page views for our corporate site are all negatively impacted. Meanwhile, the "Employee" site gets more than 100,000 visits per month and enjoys enviable metrics- low bounce rate, high average page views and average time on site. Our Goal: minimize or eliminate the negative impact of so many visitors using our corporate site as a stepping stone to reach the employee site. leverage the traffic volume and positive metrics enjoyed by the employee site to improve the search engine authority of our corporate site. Our Solution: Move the "Employee" site to a subfolder of our corporate site – for example www.oursite.com/employees Install Google Analytics on all pages within the subfolder Provide a 301 redirect from old "Employee" domain to new employee subfolder The expected result is an increase in overall corporate site traffic, more page views, higher time on site, and lower overall bounce rate from merging these two website properties. Our Need: After comparing the subfolder option to subdomain approach, we feel that the proposed solution is our best course of action and are looking for validation or an alternate recommendation.
Intermediate & Advanced SEO | | ChrisMakara0