I’m often asked about the differences between the 301 and 302 redirect and how they affect the way search engines see a site. Another popular question is why it even matters which one is used, since from a user’s perspective everything looks fine with both types of redirects
Well, even though things might look fine on the users end, these redirects can cause a great deal of trouble if not employed correctly. These two redirects have two different uses and should be applied accordingly.
Just remember a 301 redirect is a “Permanent Redirect” which transfers over the page rank and other historical search engine data. The 302 redirect is a “Temporary Redirect” which does not transfer over this information and should only be used in very limited situations.
Some examples of when you would use a 301 redirect are:
1. You decide to move the pages on your site to a new URL. You might do this if you are making internal changes to your site structure or because you are moving to a new domain.
2. 301 redirects can be used to point http://adomain.com/ (non-www) links to http://www.adomain.com/ (www-version) instead.
This is important because when search engines see URLS that point to http://adomain.com
(non-www) instead of http://www.adomain.com (www-version) the search engines may think those are two separate pages or duplicate content, The 301 redirect would take away this confusion by pointing to 1 central location only. This is also known as establishing an official or “canonical hostname” for a site.
Again, permanent redirects are another term used for 301 redirects, this sort of redirect should be used when you wish to transfer all of your old page rank to a new location for good.
Search engines are ok with this type of redirect, this WILL transfer over all of your old page rank and other historical data, so if you are updating the structure of your site this is the way to go.
The 302 redirect, which is also known as the temporary redirect should only be used as such.
Most would consider this redirect relatively useless, but it is the default redirect in most configurations, so watch out.
An example of when you might use this would be for a holiday promotion where you would like to do a temporary redirect from http://www.adomain.com to http://www.adomain.com/holiday/promo1.html. Since this is actually a temporary redirect it would be ok to use a 302 redirect for this situation.
The 302 redirect should only be used for these types of situations. It will NOT transfer over your page rank or anything else which is useful for SEO. This is also why you would NEVER use this redirect for permanent site redirects, as you would lose all of your search rankings for those pages. If you are reading an SEO blog, then I’m pretty sure that search rankings are important to you.
A good resource to check what type of redirects your site uses is Rex Swain’s HTTP Viewer This tool lets you view the HTTP headers of a page, this will show what your web browser sees before it decides what to show the user. Under the “Receiving Header” section of the report, you should see the type of redirect which is being used on the first line of the section.
I Hope this has helped to clarify the differences and benefits of these two types of redirects. Please feel free to comment with any other input on the subject. On my next post I will go over some easy ways to implement these redirects on various server configurations.