How does 301 and 302 Redirect affect SEO?

301 redirect 302 redirect

For the non-technical, a 301 and 302 redirect sounds foreign. Here, we’ll be discussing what a 301 and 302 redirect is, how it affects SEO, and how we can use it.

“Redirect” definition from the web: to direct (someone or something) to a different place or by a different route.

To make it simpler, redirecting a page often means you’re assigning a new URL to it. This is not always the case because sometimes when people use redirection, they also change the design, the coding, the navigation, etc… It depends on what purpose you are redirecting the page.

You usually redirect a page for the following reasons:

  • The URL is broken or it doesn’t work
  • The webpage/site is no longer active
  • You have a new webpage/site that you want people to visit instead of the old one
  • You’re A/B testing a new webpage in terms of design or functionality
  • You’re fixing a webpage and you want to temporarily make a detour for your users for continual website experience
  • You want your users to make the best pancakes (just kidding!)

 How do you do it?

It’s as easy as putting this .php code into your public_html folder in your hosting.

<?php
$redirectlink = ‘http://www.puttheredirectedwebpageurlhere.com‘;
//do not edit below here
header (‘HTTP/1.1 301 Moved Permanently’);
header(‘Location: ‘.$redirectlink);
exit;
?>

This code will use a 301 redirect the page to the URL that you desire. The filename of this .php should be the URL slug of the page you want to redirect.

301 Redirect

A 301 redirect, or also known as a permanent redirect, should be put in place to permanently redirect a page. The word ‘permanent’ is there to imply that ALL qualities of the redirected page will be passed on to the detour page.

That includes:

  • PageRank
  • MozRank
  • Page Authority
  • Traffic Value

A 301 redirect is implemented if the change you want to make is, well… permanent. The detour page now embodies the redirected page as if it was the former. A complete takeover.

The old page will be removed from Google’s index and the new one will replace it.

301 and 302 Redirect

302 Redirect

A 302 redirect, or also known as a temporary redirect, should be put in place if you want to redirect your site visitors into another webpage but you plan to bring the redirected page back after some time. Knowing this, the 302 redirect will not pass on all qualities of the redirected page to the detour page.

The redirected page will still retain its PageRank, MozRank, Page Authority and Traffic Value – and the detour page will not accumulate any. It’s quite dangerous to use a 302 redirect by mistake. It will really hurt your site’s search engine visibility.

In most cases, SEO specialists don’t use 302 redirects when fixing the on-site qualities of a website. Instead, a 302 redirect is often used when they want to test a new page for client feedback but they don’t want to damage or change the old page’s rankings and history.

 Tips for Keeps: Now that we’ve established which is which, I hope you’ll learn to use the right redirect when you need it.

Image Credit: SEOmoz and Distilled

From Zero to a Thriving SEO Company, We're sharing everything on our Journey to success!

You'll want to get in. Promise.

We guarantee 100% privacy. Your information will not be shared.

Comments

  1. kulwantnagi says

    Thanks for this wonderful article… i was very confused about 301 and 302 redirect. this article gives me clear picture..

  2. says

    Hello,
    Good article ;)
    But I have a question:

    Im planning to start using https on one of the site we are managing but we are not sure if moving to https will drop all the page rank and positioning that the page has so far ? I heard that using 301 redirection from http to https can do the job without affecting the SEO. What do you think?

    • says

      Yes it can help do the job. The PageRank juice will not be as good as the original though – it will drop by a bit. Not so sure by how much but I know a 301 redirect DOES NOT pass ALL the PageRank to the page where the redirection points to.

  3. says

    There are paid themes that you can use for your blog that has an automatic rel_canonical features. But in terms of website relocation it’s best to use the 301 because it will pass all the juices to the new site. These are too technical for me.

  4. dumidu says

    Thank you for the valuable article. I was confused by these two redirection methods and I could get some idea.
    Could you please elaborate this?
    “It’s quite dangerous to use a 302 redirect by mistake. It will really hurt your site’s search engine visibility.”

    Why you say its dangerous?

    For example
    If I redirect A->B
    Does it harm site A rankings?

    Thank you!

    • says

      Hi Dumidu,
      Yes, if you try to better understand the difference between a 301 and a 302 redirect, using a temporary redirect (302) means that you’re putting back the original page sometime soon. Not doing so and leaving it at a 302 redirect will decrease the SEO visibility and stats of the original page and the 302 page DOES NOT get any linkjuice at all.

      • Dumidu says

        Thank you for the reply Sean!
        I have a question and I’ll try to explain it in this way,
        I have site that’s optimized for keyword A
        I have another site that’s optimized for keyword B

        Keyword A and Keyword B are totally different and there is no relation

        I no longer use the site Keyword A, so whatever happen to this site I don’t mind, but the site with Keyword B is my moneymaking site.

        I want to permanently redirect the traffic in keyword A site to keyword B

        If I use a 301 redirect, does it harm the keyword B site? because it’ll give keyword A sites SEO values. So keyword B site will be automatically optimized for an unrelated keyword.

        What is the best redirection method for this instance?
        Many Thanks!
        Dumidu

    • says

      Ok, so here’s a question…

      I’m only interested in redirecting portions of my site to a new subdomain. Let’s call it a comingsoon.mysite.com

      And only a small portion of the overall pages are going to make it because I’m looking to test a new design/site flow, but I’m not ready to do it all at the same time.

      So if I 302 redirect articles from mysite.com/blog-post-a to comingsoon.mysite.com/blog-post-a (which btw are marked “no index”) will that have an adverse effect on my ranking?

      Or would I want to 301 those old pages to the new pages & set the new pages to be indexed?

  5. tioQUA says

    Thanks for the article and insight. You elaborate on WHAT a redirect is and WHY one might want to do it but once thing I don’t see is the answer to the TITLE question “How does 301 and 302 Redirect affect SEO?” Will it ruin my placement on some key search results where I’m at the top? Will it kill my Page rank?
    Thanks in advance.

    • says

      I’ve explained in the article about how it will affect PageRank. A 301 will decrease the pagerank your page passes on to the redirected page. A 302 will not pass any. Regarding placements – go figure from what I said how it will affect placements.

  6. says

    302 redirect should only be selected in very specific or rare cases and should be removed after a short time period as they can create problems of duplicate content

  7. says

    Sean,
    I have one main corp site and then six other domains all getting traffic (individual product sites). In trying to build the brand it makes sense to drive all traffic thru the main corp site. If I did a 301 from each product site to a respective new product page on the corp site how much google juice would I lose?

  8. Jen says

    Thanks for the info! I was researching this topic for some site issues we have right now, and I appreciate the clear and easy to read post.

  9. says

    Hi Sean – quick question. I did a 301 redirect from YaleRoth.com to iMortgageQuestions.com.

    It’s the same blog – I just want to change the URL to iMortgageQuestions.com because it’s more relavent to the site, as it’s a mortgage blog.

    Question: should I have new external links pass to the original URL (YaleRoth.com) which had PR and indexed pages, etc. or to the new URL iMortgageQuestions.com.

    Thanks. Yale Roth

  10. says

    Hi Sean, Good Day. Just Want To Ask… What Will Be The Consequences If I Use A Plugin Instead of Just Writing A PHP Code? I Don’t Want To Ruin My Affiliate Sites Template by Placing Codes That Might Not Work If I Type It Wrong =(

    • says

      I think that there won’t be any consequences unless the code disrupts user’s experience on your website – which can result to high bounce rate, little or no time on site, etc…

  11. Paul says

    Hi Sean,

    I have a sales page that I need to redesign. But instead of re-doing that page I created a new landing page. I want to do a 301 direct to the new landing page.

    My question is: If I lose some link juice will it recover over time?

    The content of the two pages is also the same, the only difference are the design elements. Duplicate content?

    Thanks!

    • says

      Yes it will. If you do a 301 redirect, the link juice should go up again after some time. You don’t have to worry about duplicate content coz the 301 redirect already says ‘this is the new page’

  12. says

    Hi Sean, thanks for your site and info. I’m doing a complete rebuild of a large website that enjoys very high organic search rank (#1 to #5 google on most of our important keywords). It has a ton of quality inbound links. The old, current site uses a site structure where all pages are in a /html/ folder. The new site platform by default uses a different structure. It will take a huge effort to maintain the old url structure, but it is possible. Although after the site is built out, it will be hard for me to add to it as a non developer end user (CMS) if the urls have to be overridden. The site is about 180 pages. If it were you would you go to sisyphean efforts to maintain the old urls or would you bite the bullet and 301 redirect every page? THANKS.

    • says

      It’s a no-braniner. I will 301 redirect every page if it has to. Link Juice is priceless and is more difficult to attain that installing a 301 or rel canonical to 180 pages.

  13. shalini says

    Really i like the way of Explaining the difference b/w 301 and 302 Redirects Affect SEO. Blog is very Informative. Thanks for Sharing….

  14. Miranda says

    Sean, I have a bit more specific question. I run a website currently that sells several brands of upscale clothing, we are essentially a high end store online. We’ve noticed through doing some domain research that several ‘versions’ of domain names are available for our brands. For instance, if we had a brand called ‘ABCD’ and abcd.com is already taken and used by the brand we carry, we have thought about purchasing abcdpants.com or abcdusa.com and having that domain url redirect to the ABCD brand page on our own website where we sell the brands’ items.

    Is this plausible for us to do? How will it effect our SEO? Is a 301 or 302 redirect really what I need to be using or is something else more viable/effective? I don’t want to delete or remove the current ‘ABCD brand page’/url on our website… I just want to know if including these new domain names/urls and having them connect to pertinent pages will effect our SEO in a positive or negative light? Any help you can provide will be appreciated. Thanks so much!
    - Miranda

    • says

      Hi Miranda,

      My opinion is that acquiring those domains, unless they’ve had formerly been owned and ranked, is quite useless even if you’re redirecting it to your website.

  15. says

    Hi Sean,
    I have to permanently redirect all of the inner pages of a website, but not the index page. There are about 150 pages. This is due to the entire website being rebuilt and a different directory structure is used so all pages will have a slightly different url than they have now, but not the home page which stays the same.

    You say: “It’s as easy as putting this .php code into your public_html folder in your hosting.”

    How do I do this for all of the inner pages, but not the home page? Thanks!
    -John

    • says

      Hi John,

      That would be much more work but it still works the same. You need to put individual .php code into your public_html folder for each page you want to redirect.

  16. says

    This is good info.
    As far as I am aware, some link juice is lost when a 301redirect is put in place. However, could it ever be harmful to a website to set up a redirect??
    For example if website A (the old site) had nothing to do, in terms of relevance, with website B (the new site), but a redirect was set up – would this detrimentally affect website B?

    If both A and B are relevant then I believe that the redirect will do no harm. (Although I’m not sure how Google determines how one page with nothing on it any longer can be relevant to any other webpage – unless it just goes on the URL???)

  17. says

    Brilliant!!! I’m new to site maintenance and have been working on several personal sites/blogs. Since I don’t want to hire anyone to do things for me, I have to learn all of this by myself. I’ve been looking for an easy to understand explanation for this one. Found a couple of forums that didn’t really help me since I’m still lacking in knowledge. This one was really easy to understand though. Thanks much!!!

  18. Anon says

    Thanks for this post. I have got over 20 domains and want to use those 20 domains to improve ranking for my main website. I guess redirect 301 would help to an extend but would it better if I create separate landing pages for those 20 pages which then have links to my main website. Please let me know which would be best approach. Thanks.

  19. justin says

    If you have a 301 redirect, and google updates pagerank, then you remove the redirect, do you keep the page rank?

  20. says

    Greetings,
    an answer is unexpected but would be appreciated.

    In the past I built a few websites in the same general niche.
    I now built a new site that I would like to use as an authority site.
    over the years the old sites build valuable links that I would like to pass through to the new site.
    this .htaccess file works:

    RewriteEngine on
    rewritecond %{http_host} ^BIRTHDAYPARTYTHEME.ORG [nc]
    rewriterule ^(.*)$ partythemesforbirthday.com/$1 [r=301,nc]

    I really need to find a way to redirect the old sites to specific pages on the new site.

    example:

    three of the old sites are 1stbirthdaypartytheme.com and 2ndbirthdaypartytheme.com and a general site BIRTHDAYPARTYTHEME.ORG

    the new site partythemesforbirthday.com
    has landing pages partythemesforbirthday.com/1st-birthday-party-themes/ and partythemesforbirthday.com/2nd-birthday-party-themes/

    I tried unsuccessful to create three .htaccess files the first one which works to place into BIRTHDAYPARTYTHEME.ORG

    than I wanted one to go from 1stbirthdaypartytheme.com to partythemesforbirthday.com/1st-birthday-party-themes/
    and one to go from 2ndbirthdaypartytheme.com to partythemesforbirthday.com/2nd-birthday-party-themes/

    No matter what I have tried I can only get the old website url’s to forward to partythemesforbirthday.com/ home page.

    What am I not seeing here? or is it impossible to redirect a Website to a landing page?

    Can you shed light on the matter for me?

    Regards

    Michael G. Schurmann

  21. says

    Sean, a question regarding canonicial urls. I have read and re-read Google’s info on this subject, but still a question. Should I put in my .htaccess file, along with all the 301 redirects for the inner pages that were necessary for the redesign of our site, a redirect for the home page without the www? The point being to redirect from the url without the www to the one with the www. Is that necessary?

    Either address gets a visitor to the site, but in Google analytics, one shows a ton of inbound links but the other (the non www one) hardly any. I’m confused.
    Thanks, John

  22. says

    Greetings +Sean Si

    Follow us on Google+ I loved your informative blog post on How does 301 and 302 Redirect affect SEO?. Valuable information and awesome webdesign you got here! I would like to thank you for sharing your ideas and time into the stuff you post!! Thumbs up

  23. says

    Hi.. Thanks for the great article. My situation is this: I acquired a domain name that ranks VERY high for a search term that is vital to my business. I’d like to use that domain to redirect traffic to my established website. How can I do this without harming my SEO for the existing page and also ensuring that the new domain I have still ranks high for this search term over time?

    Thanks!

    • says

      Link some keyphrases from the new domain to your old one and keep producing great, quality articles that give value to your visitors in your new domain. This will retain the rankings while giving off some PageRank juice to your old one for it to rank better.

  24. Harsh says

    Hello,
    I have bought a new domain name from godaddy which i plan to use for mailing purpose only and to have it on my business card as it sound good (thats the only reason for getting this domain as it sounds good and may help in branding) . as of now i have not hosted this domain and used a redirect option on godaddy to my current business site.
    My question – will such a redirection affect the PR for my current business site (or in future when i use the domain name for mailing and continue the redirection) – taking into consideration the recent penguin and panda updates?
    If so then is there any solution.
    Thanks,

  25. says

    Our shopping cart displays blank pages for items that I delete, so in global.php I set up a redirect to our 404.php page, but they are being recognized as 302 redirects. There are over a thousand of these pages so I can’t put them individually in htaccess.

    Will these previously empty content URLs (reported as missing metatags by Google Webmaster) now be crawled and still penalized since they are 302 redirects to our 404 page, or are they ok?

    • says

      Don’t delete those pages. Instead, redirect them to the new product. Or, if there aren’t any, redirect them to a page where there are similar products, telling them that the product has been sold out or expired. Never delete a page. And don’t use 302 redirects – as much as possible (Unless you’re redirecting for only a few weeks to a month).

  26. says

    This is interesting! I recently changed the format of my WordPress posts URL from domain name/year/month/day/post name to domain name/post name. Consequently, I had to use 301 redirect for my old posts. Unfortunately, my traffic reduced drastically and I got really bothered. I wasn’t told 301 directs drops some percentage of PR.

    Thanks for the tips.

  27. says

    There can never be too many tutorials on 301′s and 302′s. If you are migrating to a new CMS or e-commerse platform, make sure you redirect all your old urls to the new ones….

  28. Mabet says

    I have recently redirected my website pages.. This article really helped me understand what 301 and 302 is for. Thank you.

  29. Erik says

    When doing a redirect you need to make sure it is page to page and semantically compatible. Here is a test I did to see if recovery is possible after a bad 301 redirect. miamiwebcompany.com/blog/study-website-recover-from-a-bad-301-redirect

  30. h3sean says

    Don’t do a redirect to your twitter – you should just put the direct twitter link. It seems like you’re trying to do a bait and switch with that redirect.

  31. says

    Hi Sean! Nice article but I have a little harder question for you:

    Does the link juice(ranking score) from the redirected article adds to the score of the new one or does it just replace the score?

    I’m asking this in case I want to build links to an article that already has a redirect on it. Would these new links add to the previous score or they will not affect it at all?

    Thanks!

    • says

      Robert,

      I think if you are redirecting it to an updated version of the article, it just replaces the score.
      Otherwise if it’s a whole new article but it’s relevant to the old one, the redirect will add to its value (but you remove the value from the old article altogether – which is something I won’t do either unless the entire article is a mirror or improvement of the new one.)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title="" target=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>