When to Use a 301 vs. 302 Redirect

When to Use a 301 vs. 302 Redirect – SEO Tip Week 35

Written on September 2, 2007 – 9:51 am | by Shell Harris |

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!


There are two types of redirects you can use, a 301 and a 302. These numbers refer to the HTTP Status Code returned by the server for a given URL. A 301 redirect tells the search engine that the page has moved permanently to the new URL. A 302 redirect tells the search engine that the move is only temporary, and you may decide to show content at the original location in the future without a redirect.

301 Redirects
All three major search engines handle 301 redirects the same, that is to say they ignore the original URL and instead index the destination URL. For example,www.beekerfurniture.com uses a 301 redirect to www.hendersonsfurniture.com and Google, MSN and Yahoo all return the result www.hendersonsfurniture.com when searching for “beeker furniture”. The word beeker doesn’t appear anywhere on the hendersonsfurniture.com site, and a site search in Google shows that only the home page has any relevance for the word. Clicking on the Cached link in the site search results further shows that the word only exists in links pointing to the site, “These terms only appear in links pointing to this page: beeker.” Those links Google is referring to are actually pointing to www.beekerfurniture.com and the 301 redirect is passing along the relevance of the wordbeeker to hendersonsfurniture.com.

301 redirects can be very powerful when you redesign your site and the URLs change, move to a different domain, acquire a new domain, or implement a URL rewrite. In most cases, this is the type of redirect you want to use because you know exactly how the search engines will respond.

302 Redirects
The three major engines handle 302 redirects very differently, and because of this 302s are typically not recommended.

Google treats 302 redirects differently depending if they are on-domain or off-domain. An example of an on-domain redirect is athletics.mlb.com which uses a 302 redirect to http://oakland.athletics.mlb.com/index.jsp?c_id=oak. If you search for “oakland a’s” in Google you will see that athletics.mlb.com is displayed in the results because links point to that URL, which in turn uses a 302 redirect to the destination page. This is a great example where 302 redirects can be used effectively, since the shorter URL looks much more enticing in the results pages.

Off-domain 302 redirects would be ripe for hijacking situations if treated the same way. Because of this, in most cases, Google will treat off-domain 302 redirects like 301s, where they will ignore the original URL and instead index the destination URL. I say most cases because Google will sometimes determine that the 302 is legitimate & index the original URL instead. An example of an off-domain redirect is pets.roanoke.com which uses a 302 redirect to a third-party site http://www.gadzoo.com/roanoke/pets.aspx. In this case, Google determined that this was a legitimate use of a 302 redirect and displays pets.roanoke.comwhen searching for “pets roanoke”.

 

MSN treats 302 redirects exactly how it treats 301 redirects, it will always ignore the original URL and instead index the destination URL. A search for “oakland a’s” in MSN shows the URL oakland.athletics.mlb.com/index.jsp?c_id=oak in its results. And a search for “pets roanoke” shows www.gadzoo.com/roanoke/pets.aspx in its results.

Yahoo takes the same stance that MSN takes, except that they reserve the right to make exceptions in handling redirects. A search for “oakland a’s” in Yahoo shows the URL www.oaklandathletics.com in its results. (www.oaklandathletics.com also uses a 302 redirect to http://oakland.athletics.mlb.com/index.jsp?c_id=oak) But a search for “pets roanoke” shows www.gadzoo.com/roanoke/pets.aspx in its results.

 

There are very few times where you actually want a 302 redirect, although they are used more often than 301s merely because most people don’t know the difference. 302 redirects are often the default redirect in website control panels, and JavaScript or Meta redirects will produce a 302 status as well. In certain situations however, 302 redirects work wonders.

As with all our tips, please use them responsibly. When in doubt, use a 301 redirct.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章