Categories: Crawling, indexing & ranking :

What is the best way to 301 Redirect a large number of pages (site migration)

Showing 1-4 of 4 messages
What is the best way to 301 Redirect a large number of pages (site migration) cwpollock 2/15/10 10:39 AM
I have read the FAQs and checked for similar issues: YES
My site's URL is: www.simplifiedbuilding.com
Description (including timeline of any changes made):

I am going to be migrating my site to a new platform which uses a different URL naming convention.  I am wondering what the best way to redirect a large number of pages (say 500 plus) to a new url.

My options seem to be:

1) Write them out statically to the .htaccess file (my concern here is that a .htaccess will grow large and I'm wondering if that will result in poor performance)

2) Write a PHP script to trap the 404 error, check it against a table of redirects and redirect correspondingly if it finds a match.  

Does anyone have any experience with this? And can you recommend an approach.
Re: What is the best way to 301 Redirect a large number of pages (site migration) Robbo 2/15/10 11:02 AM


Trapping the 404 error is no use for protecting your search engine positioning.  As soon as the requester (googlebot) see the 404 server response code it backs away - ignoreing any page content that follows.

You really do need 301 Permanent Redirection.

If there is a regular pattern to the relationship between the old URLs and the new URLs, you can use "Regular Expressions" in the .htaccess so that numerous (hundreds, thousands, it all depends!) URLs are redirect with the same few lines.

Alternatively, stick to simple lines like:
Redirect 301 /oldpage.html    http://www.example.com/newpageURL.php

and take a strategic approach.  Prioritise your more important URLs, the ones that gain most traffic, more frequently appear in index results, etc and keep adding as amany as you can.

Another alternative, is to do the the 301 Redirection using the server-side scripting language (such as PHP) on a page by page basis.

Personally, I would not expect 500 one-line redirects in the .htaccess to give you a significant reduction in performance.


Re: What is the best way to 301 Redirect a large number of pages (site migration) Robbo 2/15/10 11:05 AM


Personally, I would not expect 500 one-line redirects in the .htaccess to give you a significant reduction in performance.

ESPECIALLY if you arrange things so that the most commonly requested pages (highest traffic "landing pages") are actioned first so that the processor does not typically have to search through all your redirects.


Also make sure if possible that it is a "clean" single step redirect from old to new, without any intermediate yo-yoing.


Re: What is the best way to 301 Redirect a large number of pages (site migration) Robbo 2/15/10 11:09 AM

Personally, I would not expect 500 one-line redirects in the .htaccess to give you a significant reduction in performance.

I'm assuming that your URLs are reasonably concise.   If you have those dreadfully long, dreadful URLs that might slow things down!!!

Also, if you have used  querystring (name-value pairs) in your URLs, that could make the redirection coding more messy too.