301 redirect to new website
-
We are migrating to a new website that will be using entirely new URLs under the same domain as the old website. The old website is a custom PHP script and the new website uses Drupal.
I know that I should use individual 301 redirects to the corresponding new pages.
My question is just how to set up the hundreds of 301 redirects from the old website to the new one?
Here is the process I've come up with. Please let me know if there is an easier and better way for this.
- Before actually changing to the new website: download an advanced report with all pages on this domain from OSE.
- Find corresponding pages on the new website
- Make the hundreds of 301 redirect lines in an .htaccess file with the following code:
redirect 301 /oldurl.html http://domain.com/the-full-url
Thanks in advance for your help!
-
My preference would always be to use the htaccess file for redirects. There are some situations where the site owner cannot modify their htaccess file due to various restrictions, in which case you would need to use a CMS-based solution or extension.
-
Excellent point, Rebekah. Just how would you do the redirects? In addition to finding out which pages to redirect, I'm particularly interested in the best/fastest technical way to achieve these redirects.
Is it right to do this within the .htaccess file, even if it can become quite large with a few hundred lines of redirects?
-
Thanks for your valuable input, Ryan.
Would you do the redirects with .htaccess file, or would you use another way like a Drupal module. If you would use a module, can you recommend one?
-
I agree Rebekah. Sometimes there are factors outside our control which hinder the optimal SEO solution. In those cases, you can ensure the client is aware of the impact and adjust as you recommended.
-
I agree - in a perfect world redirect all pages. I should have worded my answer more clearly to say "While 301 is a good solution, I don't always recommend it if it is not feasible due to the amount of pages on your site..."
I've worked with a lot of companies who have a lot of red-tape to go through, and really stubborn developers who often refuse to do a lot of "SEO beneficial" work they feel is unnecessary. It's really surprising how much control is in the dev's hands for changes, even coming from upper management, but this is generally a great middle ground for those types of situations.
Thanks for adding that Ryan
-
I agree with most of your plan.
I am not clear if by "advanced report" you are referring to an Open Site Explorer advanced report. If so, I would not recommend that approach. Instead, use a crawler to update your sitemap, then use the sitemap as the most complete list of URLs.
Also, I differ with Rebekah on the point of only redirecting the URLs with the most traffic. When possible I would recommend redirecting every URL to the appropriate page on your new site. Many people might bookmark a page, send an e-mail with a link, etc. You never know who has saved a URL to a page on your site. Also, you did not mention your market. Sometimes a single client is worth thousands of dollars. I would hate to risk losing a potential sale by saving the relatively small amount of time it takes to perform a redirect.
However you choose to proceed there are two additional suggestions. First, ensure your 404 page is friendly and helpful. It should offer your site's navigation, a search box, etc. Second, review your 404 errors DAILY after the site move until your error count drops down to very low numbers.
Good luck.
-
301 redirecting is a good solution, but I don't always recommend redirecting every page. Does every page get a lot of incoming search traffic on its own? I would look at your analytics by landing page and take a look at your top landing pages, and then run an OSE report and see what your top pages there are by amount of links. I would concentrate on redirecting those because they are the most important. You can then do a mod-rewrite to something like a corresponding category for the other pages to make it easier.
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 Redirects
Looking for the best way to do the following. Business has changed its name, and has also become a corporate store. The old domain name is now no longer needed as a website page has been created inside the main corporate site. Obviously i dont want to loose all the traffic that we had and want to redirect them but there is a problem, that im unable to redirect the old domain to the new one due to office 365 installed on the hosting platform, and the old emails will need to run for another 6 months. I can remove the old site and put a landing page up, but i still need to redirect all the pages to the new site, and there is approx 50+ of them. My main question is i currently have atleast 50+ redirects already in there due to seo changes over the years, some would go back atleast 5 years, whats a safe amount of time that i can remove the older redirects And am i going about this the right way so i dont loose all the hard work on rankings etc
Technical SEO | | Dunjoko0 -
New website - not showing in Google?
This site was launched 3 days ago, bimcosupply.com and I'm trying to get it to show in Google just for a branded search for the moment (Bimco, Bimco Corporation, etc). The old site is still showing in search, bimcoplumbingsupplies.com instead. This site was taken down a while back. I set up a redirect for the domain in cPanel, and also set individual pages to redirect in WordPress on the bimcosupply.com site. I've verified the site in Google Search Console, submitted a sitemap and did URL inspection on each page. Each page is showing as indexed, though now when I search site:bimcosupply.com not all pages are there, and there are two results for the home page, one "https" and one "http." (Before today, all of the pages were showing so not sure what changed). I know this new domain does not have any (or very little) domain authority yet, but I would have thought that the site should display for branded search by now. So I'm concerned that something is wrong with the site, how the redirects are set up, etc. that is preventing it from displaying. Could anyone take a look and help me figure this out please?
Technical SEO | | browncreative0 -
Questions about the Sandbox and 301 Redirects
Does the sandbox still exist? What if you have a brand new URL and do a 301 redirect from another website because the name of the service business changed? Thanks for any insight and help.
Technical SEO | | SDSLaw0 -
Page authority old and new website
Dear all, I tried to find this question using the search option but cannot find the exact same problem. This is the thing: I launched a new website in January, replacing our old website that did pretty good in the SERPs. The old website is still running on a subdomain old.website.com and the new website is on www.website.com (www.denhollandsche.nl) Both sites are indexed by google right now, but I'm not sure if that's a good thing. For our main keyword, the page on the new website has an authority of "23" and the exact same page (some minor differences) on the old website still has an authority of "30". Both currently are on the second page of google while some time ago, they where still on position 2/3/4. My question is: if I would take down the old website and make a 301 redirect for the old page with P/A 30, to point to the new page with a P/A 23, will the p/a of this new page take over the P/A of the old page? What effects can I expect? The reason the old website is still running is that google images still shows images from old.domain.com in stead of images from the new website... Thanks for your help guys!
Technical SEO | | stepsstones0 -
Will a timed 301 redirect work for Googlebot?
Our client is changing brand names and domain names. We know we need to 301 redirect the old domain, but for marketing reasons we want people to see a short message saying that the brand has changed and that they will be redirected. Example: | | Our concern is how, or if, Googlebot will intepret the redirect. Will this accomplish our SEO objective of moving the value of the page to the new domain, or do we need to do just a plain old fashioned 301 redirect and not even let the page load? Thanks for your help.
Technical SEO | | GOODSIR0 -
301 Single Page Redirects in IIS7?
Hey all -- I am working with a client, getting ready to make a full domain level change to a brand new domain. The existing domain has solid domain importance and trust, and the home page has a 5/10 GPR, so the transfer of all existing link juice is very important. Of course, I will be utilizing 301's to permanently redirect all existing pages to their new permanent homes. It will be a 1-1 structure, which I know is also best when possible. My question comes in specific to IIS. There is a wealth of information out there on the net regarding implementing permanent 301's using Apache and .htaccess, but nada when it comes to doing it in IIS7, which is what the client is using. For instance, today I am seeking to help them redirect 2 single pages to new destinations within the same domain, just diffferent folders. When you open up the IIS7 Control Panel (yes, with full Admin access), you can navigate to the directory, but the individual pages that I am looking to redirect with 301's do not show in IIS7, so you can't just right click on each page and choose "A redirection to a URL," etc. Any help on exactly how to redirect a single page using a permanent 301 in IIS 7 would be huge! Thanks guys!
Technical SEO | | Bandicoot0 -
SEO Benefit from Redirecting New Exact Match Domains?
Hi, All! This is a question asked in the old Q & A section, but the answer was a little ambiguous and it was about 3 years ago, so I decided to repost and let the knowledgeable SEO public answer... From David LaFerney: It’s clear that it’s much easier to get high rankings for a term if your domain is an exact match for the query. If you own several such domains that are very related such as – investmentrealestate.com, positivecashflow.com, and rentalproperty.com – would you be able to benefit from those by 301ing them to a single site, or would you have to maintain separate sites to help capture those targeted phrases? In a nutshell – SEO wise, is it worth owning multiple domains to exactly match valuable search phrases? Or do you lose the exact match benefit when you redirect?>> To clarify: redirecting an old domain with lots of history and links to a new exact match domain seems to contain SEO benefit. (You get links+exact match domain, approximately.) But the other way around? Redirecting a new exact match domain to an older domain with links? Does that do anything for the ranking of the old domain for the exact match keyword? Or absolutely nothing? (My impression has been that it's nothing, but the question came up for a client and I just wanted to make sure I wasn't missing something.) Thanks in advance!
Technical SEO | | debi_zyx0 -
301 Redirects
Hello, I have a problem with my website. I have a page on my website http://www.ensorbuilding.com/page.php/aboutus but if i type in www.ensorbuilding.com/page.php/aboutus/f8e45e9d9df6140bb5a7ff1173e8d828 or www.ensorbuilding.com/page.php/aboutus/0f0eea5e9ab0a3e8d91fad8fc0d3ce9c it still displays the about us page. Google is seeing this as duplicate content so what I would want to do is 301 redirect anything after www.ensorbuilding.com/page.php/aboutus . How could I implement a 301 redirect in this way?
Technical SEO | | danielmckay70