Shell Harris

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

In 52 SEO Tips, Google, Live Search (MSN), Search Engine Optimization, Search Engines, SEO Strategies, Yahoo Search on September 2, 2007 at 9:51 am

SEO TipsThere 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 http://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 http://www.beekerfurniture.com and the 301 redirect is passing along the relevance of the word beeker 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.com when 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 http://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 http://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 http://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.

  1. I think there is a small mistake in your post regarding the pet 302 redirect..you say it shows the old site, but it shows the redirected to site..which is ok and what you explained before.
    Maybe you can modify that because is a bit confusing
    thanks for the useful post
    Marius,

  2. I had a 302 redirect for some time on my site but I was doing fine with Google. Do you know cases when Google treated 302 redirects in the wrong way?

  3. I am bit unsure about 302 redirects. Let’s say I redirect my domain with 302 to a bigger site with bigger traffic and all that. I am talking about how Google treats 302 redirects. So let’s say my site is showing up in the searches(the bad site)- like in the Oakland example. People will see my site listed but when they click they will get to the good site due to the 302 redirect. Or I am missing something here and the problem with 302 redirects was not about stealing traffic?
    Thanks

  4. Using a meta refresh what header will return?

Leave a comment