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
-
Setting Up A Website For Redirects
I've got an old defunct domain with a lot of backlinks to individual pages. I'd like to use these backlinks for link juice by redirecting them to individual pages on the new domain (both sites belong to the same company). What is the best way to set this up? I presume I need some kind of hosting & site, even if it's just a default Wordpress install, which I can then use to set up the redirects? Would it be best done using .htaccess file for 301 redirects or some other way?
Technical SEO | | abisti20 -
New website's ranking dropped
Hi, Im working on brand new website i didn't even start my link building yet, just added to local directories i slowly started getting my ranking on 3rd page of Google then few weeks ago my ranking fell for all the keywords so now the website doesn't even rank on 10th page. Its been like this for a few weeks now. Here's the website Screenshot http://screencast.com/t/wDWk8sxLw Thanks for your help
Technical SEO | | mezozcorp0 -
Undo a 301 or Starting New Domain?
Hi Guys & Gals, I have a question I'd appreciate your input on. Quick History
Technical SEO | | Nobody1560986989723
When I first started in web design it was just me and a couple of clients. I had a website based on my name on the domain moxby.org.uk. The only 'SEO' work done on it was a bit of on-site work, various links based on forum and blog activity I was involved in (genuine involvement not crappy link building) and of course, building websites with a credit in the footer. When we got serious about the business we considered and finally put in place a new website, new branding and 301'd old URLs to their shiny new location on the new domain: _summitweb.net _(put in place about 12 months ago) Ranks were pretty much maintained and until recently we ranked well locally (still figuring the fallout from the last week or so's changes). The Question I would like to build a personal website, well I'm going to anyway. But as it's a personal/showcase website I need a personal URL for it and my natural choice would be my old url moxby.org.uk. However it is not that simple because summitweb.net is benefitting from redirected links and I don't want to harm our business' rankings just to reclaim a personal URL. So... is there benefit or would it be to my detriment to undo the 301 and build a website on moxby.org.uk or would it, in fact, just make more sense to buy a new domain and have a clean slate?0 -
Switching from a .org to .io (301 domain redirect)
I'm considering switching my main site from a .org to .io address; the .org is an exact match domain which helped to kickstart it a few years ago and now has about 50% repeat visitors, but was thrown off the Apple affiliation program for trademark infringement. I've found and purchased a nice (non-infringing) .io domain, and I've read the advice here on how to properly 301 the old domain; but my question is - does it matter that it's .io? Is this going to significantly hurt my rankings, even when everything has been 301'd properly? Another thought I had is that I may actually come out better off in the long run, what with Google penalties being applied to exact match domains. Is this a ranking suicide? If so, I'm tempted to leave it as is; even without the affiliation, it's making a good amount every month in ad fees that I don't want to disrupt. Thanks all!
Technical SEO | | w0lfiesmithUK0 -
Index.php and 301 redirect with Joomla
Hi, I'm running Joomla 1.7 with SEF on and I'm trying to do a htaccess redirect which fails. I have approximately 100 in effect so far and all working fine, but I have one snag. Index.php is not working as I need it to when it's redirected to www.myurl.com/ If I turn on index.php redirect to root using this code #index.php to root
Technical SEO | | NaescentAdam
RewriteCond %{HTTP_HOST} ^myurl.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.myurl.com$
RewriteRule ^index.php$ "http://www.myurl.com/" [R=301,L] And then go to www.myurl.com/test.html I'm redirected to the homepage. I think this is because all pages are index.php in joomla. SEOMOZ and Google both think that index.php and root are duplicate pages. Does anyone have any advice for overcoming this? Thanks, Adam0 -
301 redirect or 302
A client of mine has an international company named www.taxglobalizers.com if you come from Holland they 302 redirect you to the www.taxglobalizers.com/en version of the site and if you come from Holland they redirect with a 302 to www.taxglobalizers.com/nl version. I think it is best to change this in a 301 redirect. Am i correct in this? Kind Regards, Ruud
Technical SEO | | RuudHeijnen0 -
301 redirecting some pages directly, and the rest to a single page
I've read through the Redirect guide here already but can't get this down in my .htaccess I want to redirect some pages specifically (/contactinfo.html to the new /contact.php) And I want all other pages (not all have equivalent pages on the new site) to redirect to my new (index.php) homepage. How can I set it up so that some specific pages redirect directly, and all others go to one page? I already have the specific oldpage.html -> newpage.php redirects in place, just need to figure out the broad one for everything else.
Technical SEO | | RyanWhitney150 -
Does 301 redirect pass "freshness?"
Greetings! I work for an online retailer, and we recently launched a voting tool that allows customers to voice their opinion whether or not we should carry a new item. It's been a huge success and we've been generating thousands of comments. As a result, it's helped our SEO, and our products are showing up on the first page for some keywords without having any external links pointing to these pages. Our plan is to sell a product if it does well during the voting period. Unfortunately, we're not able to process the sale on the voting page, and need to redirect users to another page on our site. I understand that a 301 redirect transfers "linkjuice" to the new destination URL. But does it also transfer "freshness?" I ask because our new landing pages will not be updated as frequently as the voting pages. Example of our Voting Page:
Technical SEO | | znotes
http://www.uncommongoods.com/voting/product/50012/infant-fortune-cookie-booties Example of Redirected Item Page (where sale can be processed):
http://www.uncommongoods.com/product/baby-tube-socks-set-of-4 Any help/comments would be appreciated. Thank you!0