When to Use HTTP 301 and 302 Redirects for the Best Results

Posted on July 18, 2020 by in WordPress | 5 comments

When to Use HTTP 301 and 302 Redirects for the Best Results

The internet is always changing. Sites like archive.org are specifically designed to keep track of those changes. In order to facilitate the organic nature of the net, HTTP status codes 301 and 302 were developed to make sure that if you changed sites or needed to adjust a URL, you didn’t need to worry about losing backlinks, breaking your own site’s structure, or even swapping entire sites from one place to another.

This article is aimed at the best practices for using a 301 or 302 redirect. We already have a full guide on how to go in and create the redirects that you should check out to dig into the finer details.

Subscribe To Our Youtube Channel

What is a 301 Redirect?

A 301 redirect is considered a permanent redirect. You are redirecting example.com/page-a to example.com/page-b and (generally) have no intention of using the first URL anymore.

This means that Google will essentially treat the new URL as the canonical one, and in doing so, will transfer all link juice and page rank from /page-a to /page-b. Formerly, Google would only pass partial page rank via 301. The search engine has since updated its algorithm and now passes along full link juice to the target URL. The old URL basically becomes the new one in the search engine’s eyes. Eventually, the old URL will be de-indexed and replaced by the new one.

So when do you use a 301? There are quite a few reasons why you’d want to permanently change URLs in the eyes of Google.

When To Use HTTP Code 301

When a Page’s Content Moves or Changes

The main reason people will use HTTP code 301 is when a post or page moves to a totally new location. An example of this is when a website audits their content and realizes they don’t need as many pages as they once did. They want to move to a single-page website, with everything sectioned off and available via scroll. The site can merge content that content, consolidating their Contact Us, About, Blog, and Subscribe pages.

The site would then follow our guide‘s advice on setting up the 301s. All you would do is set the old URLs (/contact, /about, /blog, /subscribe most likely) to redirect to /home (or whatever slug you use for  your home page. You can use simple a / as the target URL rather than a full site or even /home, but we’ve had a few issues where the 301 doesn’t always work. So we prefer a custom slug.

When There’s a Typo or Bad URL

Sometimes, the URL is just wrong. Or bad. Maybe you typed in /post-nmae instead of /post-name. Or maybe you have an automatic post importer (or a staff writer who doesn’t follow your style-guide) and you have a slug that looks like /podcast-season-5-episode-3-the-title-of-this-episode-is-too-long-but-whatever. You would definitely want to redirect it to something more friendly like /s5e3-long-title.

Performing an SEO Audit

If you’re performing an SEO audit of your site and notice that you have some non-optimized URLs, a HTTP code 301 is your way to go. You could change a /is-divi-the-best-page-builder-a-review-and-what-i-think-about-it to /divi-page-builder-review to better capitalize on the keyword. Just make sure your keyword and URL change is still pertinent to the content.

To Create a Branded Redirect

Just like URL shortening services and tracking URLs, you might want to take an unfriendly, cumbersome URL and turn it into something branded for your site. If you have a Discord server, and the invite URL is discord.gg/RYr2eD, and you want it to be easier to remember and share, you can create a redirect using HTTP code 301 from brandedwebsiteurl.com/discord or discord.brandedwebsiteurl.com. 

Those are a lot easier to put on banners and use in links than the original. The same concept applies to promotions or courses or podcasts or whatever else. You can create 301s using unique URLs. You can 301 redirects to send myamazingnewpodcast.fm to brandedwebsiteurl.com/podcast. That way, you get the link juice from either URL, while keeping a unique URL for that project separate.

Archive Updates

Sometimes, a website that’s been going for a long time has need to clean up the older content. Maybe that content is outdated, or maybe it doesn’t even apply or need to exist anymore. But the pages are still there, indexed by search engines. 301 them!

You can take the content, refresh it, update it, or even rewrite it. And as long as you publish it under a new URL, you can just redirect the old one on the same topic to it. You can take /the-best-fonts-for-2014 and update it to /top-2020-fonts, and you get the SEO power of the first one while boosting your new post, too.

Additionally, if you need to delete /the-ten-reasons-i-am-the-worst-person-ever, you can always set that URL to redirect to a similar post. Or your homepage. That way, instead of a 404 error when the search engines can’t find the content it’s looking for, it still sees your site. And not a gaping hole in your content.

What is a 302 Redirect?

Now consider the HTTP code 302. In particular, a 302 is a temporary redirect. By using a 302 over a 301, you’re telling search engines that the page in question hasn’t moved, that it still exists, that you’re just detouring the visitors for one reason or another. The search engine then won’t try to re-index the target URL to replace the old one. Google knows that you’re just taking a hiatus from that URL.

Remeber, because it’s a temporary redirect, absolutely zero link juice transfers via 302. That’s an important distinction between the two kinds.

When To Use HTTP Code 302

There are far fewer use cases for a 302 than there are for a 301. After all, how many times do you want to send users back to a typo-ridden URL or an outdated piece of content? 302s do have their uses, however, and we want to make sure that you’re using them correctly.

  • When you are A/B testing a new site or design. You can see how people react to the new site or page without adversely affecting the other.
  • When a site or page breaks for an unknown reason. Setting up a quick 302 redirect gives you time to troubleshoot and debug without worrying about affecting user retention.
    • Similarly, when a site is undergoing maintenance, you can use a 302 to detour users into the alert page instead of them finding a broken or downed site.
  • When your client/boss needs to give feedback on a feature or design. If you need to show off how something works in a production environment, a 302 is a good way to do that without affecting your SERPs.

These are some of the primary reasons to temporarily redirect from one page to another. HTTP code 302 is not meant to be used over a long period of time, but when you use them short-term and for the right reason, you should not see a noticeable impact on your SEO and SERPs.

Wrapping Up with HTTP Code 301 and 302

As you can see, there are a lot of different reasons to use the HTTP code 301 and 302. The internet changes, and your website is going to change, too. You will need to adjust things on a production site at some point. The important thing is that you know how to adjust them without having a negative impact on your users, your SEO practices, and SERPs.

Do you have any other best practices for redirecting pages? Let us know in the comments!

Article featured image by Indie Design / shutterstock.com

Premade Layouts

Check Out These Related Posts

Best Practices to Optimize Your Anchor Text

Best Practices to Optimize Your Anchor Text

Posted on August 3, 2020 by in WordPress

Even if you aren’t familiar with the phrase anchor text, you have almost certainly used it. Anchor text is the actual text you click on for a link, whether it is click here, check this out, or a keyword that indicates that you’re navigating to a list of the best code editors...

View Full Post
Unsplash WordPress Plugin Overview and Review

Unsplash WordPress Plugin Overview and Review

Posted on July 28, 2020 by in WordPress

Unsplash is one of the most popular sources for free images on the net. Unsplash has millions of professional quality images that are free to use in your commercial and non-commercial projects with or without attribution. This makes Unsplash popular with WordPress blogs and websites. Unsplash has...

View Full Post

5 Comments

  1. this ia a very detailed post. I really need this knowledge. And lucky found it in my google discover section. Thanks for the knowledge

  2. I was curious about many sites using 301 redirects and as a complete newbie I could not understand the reason. Thanks for this article. I can now use 301 redirect as required.

  3. When To Use HTTP Code 302 #3: giving feedback.
    I don’t understand EXACTLY how this would work. I wish you had given a more detailed example.
    But thanks for all the rest. It was valuable.

  4. What are we supposed to do after the 301 is correctly applied. Do we request the old URL be indexed, insect the URL or do nothing and just wait for google to find the 301?? Thank you

    • Google will find the new URL as it is indexed. You can request a new crawl of your site to get it done faster, but when it indexes the new URL, it will see the 301 and give it the link-juice from the old one. You shouldn’t have any issues. The old URL will still be indexed based on its previous links, but that juice will transfer to the new one which will be the primary index/canonical url. If that makes sense.

Leave A Reply

Comments are reviewed and must adhere to our comments policy.

Join To Download Today

Pin It on Pinterest