For people without much of a technical background, the terms “301” and “302” redirect probably sound like gibberish. However, the truth is that they could be more important to your SEO efforts than you might think. Here, we’re going to discuss what the difference is between a 301 and 302 redirect, how each of them impact your SEO, and how you can use them.
Let’s start by looking at what the term “redirect” means. Online, when you “redirect” someone, you direct them to a different place, or ask them to use a different route. When you redirect a page, you assign a new URL to it in most cases. Sometimes, people who use a redirection will also change the coding, design, navigation, and more.
Usually, pages are redirected for one of the following reasons:
- The URL doesn’t work
- The site or webpage isn’t active anymore
- You’d prefer people to visit a new site/webpage instead of the old one
- You’re A/B testing a new webpage
- You’re fixing a webpage and you want to detour users temporarily
How to Redirect Website Visitors
In order to redirect your website visitors, you’ll need to place a couple of lines of .php code into your public_html folder within your hosting account. It’ll look something like this:
<?php
$redirectlink = ‘www.yourwebsite.com’;
header (‘HTTP/1.1 301 Moved Permanently’);
header (‘Location: ‘.$redirectlink);
exit;
?>
It doesn’t seem very impressive on the surface, but that’s enough to use a 301 page to redirect the site to the URL that you want your customers to visit. The filename of your .php should be the existing URL for the page that you’re hoping to redirect.
What is a 301 Redirect?
A 301 redirect is also referred to as a “permanent” redirect, and as the name might suggest, it should be used when you’re looking to permanently redirect your users towards a different page. The term “permanent” is used to indicate that all the different qualities included on the page to be redirected will be transferred over onto the new detour page. That will include all of your information, and your SEO details, like your:
- Traffic value
- Page authority
- Moz Rank
- Page Rank
If you don’t want to go back to your old page – ever, then the 301-redirect page is what you’re going to need. The detour page will become the redirected page as though the original page never existed. It’s a total takeover. Additionally, during the process, the old page will be removed from the Google index, so that the new one can replace it.
What is a 302 Redirect?
So, if a 301 redirect is a permanent solution – you’ve probably already guessed what a 302 redirect is.
A 302 redirect is also referred to as a “temporary” redirect, and it’s intended for use when you want to move visitors to your site onto a different webpage but you want to bring your redirected page back eventually. For instance, if you’ve got a temporary breakdown. Because it knows it’s only temporary, the 302-redirect page won’t pass on the existing qualities of the redirected page.
Basically, your new detour page won’t accumulate any new PageRank, Page Authority, Moz Rank, or Traffic value, and the redirected page will maintain what it already had. Make sure that you don’t accidentally use a 302 redirect, as this can cause some serious damage to your SEO solutions.
Most of the time, an SEO specialist won’t turn to a 302 redirect when they need to fix the problems with an on-site issue on a website. Instead, 302 redirects will only be used when a company wants to try out a new page for a client, but they don’t want to damage anything to do with the old page’s ranking.