What is the difference between 301 and 302 redirects in SEO?

HTTP Response Status Codes are designated numbers that indicate the web server’s response to the requested URL. These codes inform the browser, and search engines crawlers, on how to handle the request. Among the most well-known of these codes is the 404, aka “page not found.” But in reference to Search Engine Optimization, the 301 and 302 codes are just as important. That variance can make a world of difference in your SEO efforts, ranking, and overall effectiveness.

What is the difference between 301 and 302 redirects in SEO?

What are those 301 and 302 numbers anyways?

The official registry of HTTP status codes lists five classes of status codes, with the first digit of the status code identifying the response class. The 3xx means in this case means the status code is in the redirect class.

Now if you are familiar with SEO and read about it online, you have almost certainly heard the phrase “link juice.”  This is where the redirect status codes come in to play. If you need to suggest to the search engine crawlers that your page, content, URL, or site has moved, then you need to redirect them. The status of that redirect has substantial importance in properly reassigning the “link juice” or ranking value.

What is a 301 redirect?

A 301, or permanently moved, is a redirect that carries and distributes in an absolute manner. You should use a 301 to signify to the crawlers that your content has moved permanently – as in forever.

When should I use a 301 redirect?

An example of when to use the 301 redirect would be if you have changed domains or if you launched your site in a new CMS and your URL structure has changed. Creating 301 redirects for your old content to point to the new content will tell the search engines that you have moved from A to B for good. This will allow search engines to direct ranking and value signals to the new URL because they understand this location to be the new, permanent home for that content.

What is a 302 redirect?

A 302 status code means Found, or more commonly referred to as “temporarily moved.” This redirect doesn’t carry or pass the link value to the new location. What it does do is get the user to an appropriate location for you so that you aren’t showing them a broken link, a 404 page not found, or an error page.

When should I use a 302 redirect?

You might ask, “If it doesn’t distribute SEO value then why would I use it?” A good example of when to do a 302 redirect would be in an e-commerce setting. Let’s say you have a product that you no longer have for sale– maybe the product is seasonal, out of stock, or is something that you might sell again. In this case, you might want to use a 302 redirect to send the user to the category page. If the product outage is going to be for any real length of time it might not make sense to send the user to a page that they cannot order from, so you redirect them to the category page allowing them to look at similar items. And with that 302 you are telling the search engine crawlers that your content is just offline temporarily and they should keep the value of that page intact and not pass it to another URL.

When approaching your SEO and changes in your site’s location or structure, it is important to remember the technical signals. Improper use of the signals could result in a catastrophic loss in link value for your content, which can be tough to overcome or rebuild.

Bottom line: pay attention to the status, because no one wants to redo their content distribution efforts due to the “simple” difference between the numbers 301 and 302.

{photo used under Creative Commons from jerryonlife – flickr}

  • lisa foreman

    Any idea if we should use a 301 or 302 for users who attempt to add an item to their cart but need to create an account first? (We’re sending them to the account signup page and then letting them continue once they create an account.)

    • eppand

      Lisa, for that need i would suggest a 302. You aren’t permanently moving the file; rather, you are temporarily guiding the user to a better, more complete experience on your site.

      • lisa foreman

        Thank you!

  • Great post…Thanks you for share

  • Soheil Balini

    What is the best solution for a directory website (or a magazine that links to other sites)? Direct links? or redirects? what type? 301? 302? or meta? this question is on my mind for a long time 🙂

    • eppand

      I would encourage the direct link route, but if you do redirects for tracking purposes then you should do a 301 redirect to provide maximum link equity to the site you are linking to. In terms of the meta refresh, that should be a last resort.

      • Soheil Balini

        I thought I read somewhere that having too much direct links on a webpage is bad for SEO. tnx for your help

        • eppand

          General rule of thumb is to limit total links. It’s not just direct, or external, links. There are a few authority voices that suggest 100 links page as the guideline, but that is just that… a guideline. Best question to ask, Is the link beneficial to the reader? If so, then it is a worthy link.

  • Hi, my wife works for Nevada Oral and Facial Surgery and their webmaster is forwarding their “non-secure” site http://www.nevadaoralandfacialsurgery.com to a “secure” site https://www.nevadaoralandfacialsurgery.com using 302 redirects instead of 301 redirects. I read your article and some similiar articles and I think that they are completely wrong in doing so. Can you please confirm and/or comment on this? I’m afraid obviously that they are mistaken and will possible trash the traffic to their website. I was told they are currently indexing the https secure website. Thanks!

    • eppand

      Dave, first off, thanks for the read. Secondly, your concerns are validated. The 302 redirect, or temporary redirect, does not pass the link equity assigned by the search engines. Essentially, the 302 is telling the search engines that the https is only a short term transition. It does look like the https version of the site is being indexed and given precedence in Google, but this is a missed opportunity to convert the link equity that non Google sites are giving by linking to the http version of the site. I would encourage the 301 redirect to maximize that potential.

      Also, it looks like the 302 redirect only works on the homepage. For example, you can reach and view the http version of the interior pages. Just navigate to a page then update the URL to view http:// instead of https://. On a Linux server, fixing this is easily accomplished in the .htaccess file. This may be a bit more in depth for your developer because your site is on a Windows server using ASP.net. But you can handle the Permanent (301) redirects in IIS or in the web.config file.

      Hopefully that helps!

      • Thanks so much for the quick response. I was afraid they were wrong.

        • eppand

          Dave, yes I am an advocate for the move to https://. Google and Bing haven’t come out right with it yet, but it makes sense to turn into a ranking factor for the effort to combat spam. We have done it with our domain and have taken this step with many of our SEO clients.

          • Hi Andrew,

            NOFSLV.com is looking to give their current web designer SEO company the boot and they want me to help recommend a couple of companies. I was impressed by your responses. What email can I contact you at? I’m out of town until Thursday but I wanted to give you a heads up.

            Thanks for your time,

            Dave

          • eppand

            Dave,

            Certainly, I would welcome the conversation. My general means of contact can be found on my author profile (https://www.ltnow.com/author/andrew-epperson/) but you may email me directly at aepperson@LTnow.com

            I have recently published an update around the topic of HTTPS and search here: https://www.ltnow.com/https-ranking-factor/

            – Andrew

          • OK I sent you an email yesterday from lvdave****@hotmail.com titled Website Help

  • Sagar Trivedi

    301 redirect when open url With www. and with out www. right?

    • eppand

      Yes, you would 301 to a with or without www.

  • Hi Andrew, good points for 301 and 302, i never read before it, ::))))

  • Naman Sharma

    Can someone help me regarding this. My website redirect to some other website. i need to fix it.

    • eppand

      Naman, From the looks of that screen shot I would suspect that your site has been compromised in a malware attack. That is not a 301 v 302 redirect problem, but rather a website security and vulnerability problem.

      • venkatesan j

        Hi Eppand,

        My sitemap file telling 302 error for my sitemap files, but i actually removed the redirect plugin.

        But still my sitemap not crawling by google and showing error for 302, please tell me how i can handle the situation.

        Thanks in advance for your help.

  • ageta

    can you please instruct me how to find out if i’m using 301 or 302 ?

    • Try seobook or if you are on POSIX machines (Mac, Linux), try this in terminal:


      curl -i http://www.YourWebsite.com/ | grep HTTP

      for example:

      curl -i http://www.insalgo.com/ | grep HTTP

      Gets:


      HTTP/1.1 302 Moved Temporarily

    • eppand

      I also recommend the seobook tool: http://tools.seobook.com/server-header-checker/

      Simple and easy to read the results.

  • Hello Eppand, When we talk about http://www.example.com and example.com, so i need to use canonical for that, but i can use 301 redirect too instead of canonical, so my question is that what will be better in that case??

    Samtaa Jain

    • eppand

      samtaa, You should always define a canonical URL and you need to employ the redirect on the www vs non-www to avoid redundant hostname issues. So it’s not an either or – they both serve their own purpose. The canonical would help with syndication, RSS, duplicate content issues.

  • Thanks for sharing this great post. Really appreciate. 🙂