How does 301 and 302 Redirect affect SEO?


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.

$redirectlink = ‘‘;
//do not edit below here
header (‘HTTP/1.1 301 Moved Permanently’);
header(‘Location: ‘.$redirectlink);

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

Embed this on Your Site!

Double Your Growth.

We curate the best of inbound marketing news and send over the top 10 we know will contribute to your growth - once a month.

  • Well thanks for the info. I learned a few things which can help my cause for my website

    • My pleasure Ganderson! Glad you picked something up from this entry.

  • kulwantnagi

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

    • My pleasure! I’m glad this entry made it clear to you. I used to be in your shoes too pal!

  • Blue

    Thanks for the info, It got me reminded of the usual SEO technique.

  • 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?

    • 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.

  • 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.

  • dumidu

    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!

    • 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

        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!

        • Redirect it ONLY if they are relevant and if the traffic you’re getting from website A is also interested in website B

          • Dumidu

            What is the suitable redirection method for this instance 301 or 302 ? This is a permanent traffic only redirection. thanks!

          • 301 is mostly better than 302. It depends on the situation really.

    • 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

      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 to (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?

  • tioQUA

    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.

    • 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.

  • 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

  • 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?

    • You would lose, I would guess around 10-20%. Again, this is just a guess. Perhaps before you use a 301, you can also insert a canonical tag in each of those pages? Perhaps you would lose lesser if you do so.

      • Thanks. How would the can tag help?
        Any other options when trying to consolidate a bunch of sites? It seems like a 301 is about the best option…

        • That’s about the best option I can think of as of now Eric. Thanks!

  • Jen

    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.

  • Hi Sean – quick question. I did a 301 redirect from to

    It’s the same blog – I just want to change the URL to 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 ( which had PR and indexed pages, etc. or to the new URL

    Thanks. Yale Roth

    • No you should bypass the original one if you are going to build on iMortgage :)

  • 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 =(

    • 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…

  • Paul

    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?


    • 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’

  • 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.

    • 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.

  • shalini

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

  • Miranda

    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 is already taken and used by the brand we carry, we have thought about purchasing or 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

    • 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.

  • 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!

    • 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.

  • 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???)

  • 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!!!

  • Anon

    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.

  • Emanpangan

    Very helpful man. Many thanks!

  • justin

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

    • Yep! You get to keep the PR

  • 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 ^(.*)$$1 [r=301,nc]

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


    three of the old sites are and and a general site BIRTHDAYPARTYTHEME.ORG

    the new site
    has landing pages and

    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 to
    and one to go from to

    No matter what I have tried I can only get the old website url’s to forward to 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?


    Michael G. Schurmann

    • Hi Michael! Can you post your question in the SEO Hacker Groups? Thanks man!

  • 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

  • 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

    • Hi Chia,
      Thanks! Glad you like the article. Hope it helped you out in your redirect problems.

  • 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?


    • 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.

  • Harsh

    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.

  • Bob

    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?

    • 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).

  • Ayo

    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.

  • 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….

  • Mabet

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

  • Erik

    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.

  • h3sean

    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.

  • 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?


    • 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.)

  • Lesley

    This site really has all of the information I needed concerning this subject and didn’t know who to ask.

  • Celine

    Hi Sean,
    I had a website that Google has indexed 56,000 pages. I used to get lots of leads, but not anymore, so I cancelled that real estate website so I can use a WordPress real estate website. My question is….if I build a new website using that same domain name, do I need to use that 301 redirect code? What happens if I don’t use the 301 redirect? By the way, I own that domain name.

    Thank you.

    • Celine,

      If you don’t 301 redirect your old pages to your new one, no SEO value will be passed on. All that hard work and domain name aging will sum up to nothing. It’s highly recommended to redirect your old pages to the new ones – assuming that the old site was not, in any way, penalized by Google.

      • Ryan

        Hi Sean,

        What happens if you 301 redirect a penalized site to a new site?

        • Ryan,
          The new site will get the penalty – sooner or later :)
          My advice: do a 302 redirect. It does not pass on any of the rotten link juice but the visitors who are familiar with your previous URL will still be redirected to your new site. I’ve done it for a client of mine and it was pretty much what we needed.

  • Dharmesh

    Thank u very much sean…

  • Ryan

    Hi Sean,

    This may have been answered already, but I just wanted to clarify something.

    I have my money site and then I have another relevant site which is receiving an abundance of traffic due to ranking well for a specific KW.

    If I 301 this site to my money site will this other site lose its ranking power for this KW it’s currently doing well for? It would be great to re-direct the traffic, but not at the cost of losing the rankings the site has earned.

    Please let me know, I’m really confused about this.

    • Ryan,
      I answered this in another comment :) just do a 302 redirect instead.

  • Thank you for information. But if you want to change domain without passing the pr and pelanlies from old domain to new, and you dont want to loose traffic from old visitors or refferals, what is the right method? I tried the meta-refresh method but in webmaster tools I see in “new links” that google still pass old links from old domain to my new domain. What is your opinion?

    • Do a 302 redirect if you don’t want to pass linkjuice to the new domain but want to redirect the traffic :)

  • Andy

    Hi Sean, I have a question here (sorry to hijack 3 years old topic)

    My clients has plenty domain, let say 6 domain, make it example (not real) and he also had all surrounding suburbs domain let say,,, etc. the reason he asked me to do that so if anyone live in CityA and search CITY A Handyman, his website (CityAHandyman) will coming out first.

    As his request, so every pages had their own main front pages except all content will be directed to the main website (

    At the moment, the SEO is working as if we live in City B and we want to search “city b handyman” will coming out first on google.

    now my question is can i just redirect 301 the other secondary domain to the main domain? (without having a front pages)? do it will damaged the current secondary SEO? if we take off everything just put index.php on all secondary domain?

    What is you suggestion Sean? thank you

    • Hi Andy,

      If you do a 301 redirect from all the subdomains to the main domain, it will wipe your search engine rankings for the subdomains. So if you want to keep the subdomains ranking for the surrounding suburbs, don’t do a 301 redirect. Why don’t you just simply link all the links inside the subdomains to the main domain’s content? That way, people will land in the subdomain but when they click something in it, they’ll be directed to the main domain?

  • Riverside

    Thanks Sean, im learning more everyday on your advice.

  • I have a question… if I have a page with .php and another without… if I redirect with htaccess 301 I resolv my problem?

    • Could you give an acutal example so I could better understand your question please?

  • Yes

  • Generally https ranks a bit better :)