301 Redirects: What Are They And How To Set Them Up For SEO

Brandon LazovicMarch 2, 2021

Looking to learn more about 301 redirects, what are they, and how they can improve the organic health of your website? 

Read our latest guide to learn more about common redirect directives that webmasters use; best practices for 301 redirects; and how they can improve your website keyword rankings when implemented properly. 

What Are 301 Redirects? 

A 301 redirect is a method used to send users and search engines to a preferred destination URL. 

Common URL Redirect Directives

Below are the most commonly used URL redirection directives: 

301 Moved Permanently

This signals to search engines that a page has been permanently moved. It also passes full link equity from the old page to the new destination page. 

302 Found

Unlike 301 redirects, 302 redirects are used to signal a temporary change in the URL destination. This is most commonly used if there are updates to a page, such as special limited-time promotions, or seasonality (such as the superbowl, which is held every year but for a small amount of time). 

NOTE: if left in place for too long, 302 redirects will eventually be viewed as 301 redirects by search engines. 

307 Moved Temporarily

A 307 redirect serves as the successor, or replacement, of 302 redirects. However, in order to use 307 redirects, your server must be viewed by search engines as HTTP 1.1 compatible - if in doubt, just stick with 301 or 302 redirects. 

Looking to learn more about search engine optimization? Read our SEO beginner’s guide for everything you need to know about SEO and how to drive business results through search engines like Google and Bing. 

When Should I Use A 301 Redirect?

301 redirects should be used when you want to direct users to a different destination page. This often happens when websites work to consolidate content, or remove outdated content that isn’t valuable. 

When you delete a page, Google will still be able to view the old URL, which will show as a “404 error”. This isn’t a friendly user experience, so a best practice is to redirect the old URL to a new one. 

301 Redirect Vs. 302 Redirect

Like I mentioned before, 301 redirects are used to signal permanent URL address changes, whereas with 302 redirects, these signal to search engines that it’s a temporary change. 

In most cases, it’s best to stick with using 301 redirects, unless your implemented redirect will be in place for less than a few months. 

Why 301 Redirects Are Important For SEO

Below we’ll cover a few points regarding why 301 redirects are important for SEO. 

Keyword Cannibalization

Keyword cannibalization can happen when multiple pages on your website rank or target the same keyword. 

When keyword cannibalization happens, this can harm your potential ranking on both web pages. As a way to prevent keyword cannibalization, it’s important to conduct a site audit to determine what pages may be cannibalizing one another. From there, you can either choose to consolidate that content into a stronger piece (and 301 redirect the old pages to the new, better page), or 301 redirect irrelevant content to that better page. 

Consolidation Of Content

Like I mentioned before, it’s important to consolidate your content if it’s targeting a similar topic and isn’t adding value by living as a standalone piece. 301 redirects come into play to ensure both searchers and users are finding your new content, rather than your outdated copy. 

301 redirects also help pass link equity (a major ranking factor on Google) so that your new page can rank effectively in the search results. 

New Site Domain

Let’s say you decide to move all of your website content to a new domain. Or you update your site’s domain name/root domain URL to a new one. 

301 redirects must be used to ensure that searchers and search engines can discover your new domain/content. 

If a 301 redirect isn’t implemented, Google will continue ranking your old website, while your new one will take months or even years to rank prominently in the search results. 

A 301 redirect is a way to tell Google “hey, my website lives over here, so index and rank this URL instead of the old one.” 

It can take months for Google to pick up and use the new destination URL as the preferred site/page, but without one, you’re basically starting your website from scratch and wasting years of SEO work and authority. 

How To Set Up A 301 Redirect

Below we’ll walk through how to set up 301 redirects on your website. 

301 Redirect Via .htaccess

One of the most common ways to implement a 301 redirect is to implement it through your .htacccess file that runs on an Apache server. 

Here’s an example of what this may look like if you’re planning on redirecting your entire domain: 

Redirect 301 / http://www.example.com/

Redirect Single Page

You can use this redirect method on an individual page level: 

Redirect 301 /oldpage/ http://www.example.com/newpage/

PHP Redirect

If you want to redirect via PHP, here’s an example of how to do so: 

<?php

header("Location: https://www.example.com/", true, 301);

exit();

?>

JavaScript Redirect

While you do have the ability to redirect via Javascript, it’s not a SEO best practice, because Google may not interpret the redirect correctly because it’s executed via client-side javascript. 

<script type="text/javascript">    function redirect1(){        window.location = "http://www.example.com/new-url/"  }   setTimeout('redirect1()', 5000);   </script>

Using Apache Mod_Rewrite

Here’s an example using Apache mod_rewrite: 

RewriteEngine on

RewriteBase /

rewritecond %{http_host} ^domain.com [nc]

rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]

Wildcard Redirects

Wildcard redirects allow you to redirect a large batch of URLs by using a single redirection rule. An example code be: 

Redirect https://www.example.com/old-category/ to https://www.example.com/new-category/

Implementing a wildcard redirect in this fashion will redirect all URLs with the /old-category/ subfolder to /new-category/ and is useful for larger website migrations or changing URL subfolder naming conventions. 

Redirect Plugins

If you aren’t great with .htaccess, there are a plethora of 301 redirection plugins you can use on sites like WordPress. Two of the top ones on WordPress are 301 redirects and simple 301 redirects. 

301 Redirect Best Practices For SEO

Now that we’ve covered how to implement 301 redirects for your website, let’s dive into best practices to improve your website’s organic health when implementing them. 

Make Sure All URL Versions Redirect To HTTPS

I’ve talked about this in my guide to canonicalization tags or best practices when crafting a URL for SEO, but make sure all URL variants redirect to a single, preferred version. As an example: 

http://www.example.com and 

https://wwwexample.com

Are seen as separate URLs in the eyes of Google. This can cause duplicate content issues, or confusion on where to pass link equity, which will hurt your organic rankings. 

Remove 301 Redirects From Sitemap

To preserve crawl budget, make sure you remove 301 redirects from your sitemap.xml file. You don’t want Google crawling URLs that no longer exist / are being redirected. Instead, replace the old URLs that are being 301 redirected with the new destination URLs. 

301 Redirect To Equivalent Pages

If you’re consolidating or getting rid of content that isn’t valuable, make sure you 301 redirect them to an equivalent page. So if you have a piece of content that talks about loan limits of FHA loans, you can 301 redirect that page to a similar piece of content (like a master guide to FHA loans). 

This will ensure the better page benefits from link equity getting passed down, as well as signals to Google that this is the preferred page, which will help improve that page’s keyword rankings. 

Fix 301 Redirect Chains Or Loops

To preserve crawl budget from Google and ensure that all of your website pages are being crawled regularly, you want to fix redirect chains or loops. So if you have Page A pointing to Page B, which points to Page C, you want Page A to point to Page C instead of Page B. 

This will also help with passing link equity. The more redirects are in place or chained/looped, the more link equity is lost in the chain, so you’re passing less equity than you otherwise would be. 

Fix Broken Redirects

This ties in with my previous point, but you want to fix broken redirects, or redirects that are pointing to 404 pages. You can find broken redirects (they’ll appear as 404 errors) in a number of site audit tools, such as Ahrefs or Screaming Frog. 

Fix 404 Errors

This also ties in with my last point - make sure that your website is free of 404 errors. These types of status codes are a poor signal to Google in regards to the organic site health of your website - the more 4xx errors you have, the less reliable your site appears to Google, which will harm your overall site rankings. 

You can use Ahrefs or Screaming Frog to pull a list of 404 pages, and implement 301 redirects to appropriate pages that have similar content. 

Note: if you don’t have similar content, you can either build a page to match that topic, or you can 301 redirect to your homepage. However, Google considers homepage redirects to be “soft 404s”, so you should use this as a last resort when fixing 404s on your website. 

Avoid Using 302 Redirects

I mentioned this earlier, but 95% of the time you should be implementing 301 redirects. 302 redirects are considered “temporary” and eventually are seen as 301s after a period of time has passed. To avoid confusion from Google, stick with 301 redirects unless the redirect is temporary/will be lifted in the future. 

Fix External URLs That Are Redirected

Lastly, you want to fix any external URLs that you’re linking to on your website. This can be time consuming, as you have no control over when another domain is going to remove pages, or implement 301 redirects of their own. However, you don’t want to point Google to a chain of external 301 redirects - go through and update your external links to point to the final destination, or even change them to a more relevant resource. Again, you can use tools like Ahrefs or Screaming Frog to pull a list of impacted URLs. 

Categories:
Digital Marketing
Social Media
Digital PR
Photography
SEO
Analytics
Tool Reviews
Local SEO                                                          
Contact: 
brandon.lazovic@gmail.com                           

Sitemap           Privacy            Editorial Guidelines
Copyright © 2021 Brandon Lazovic LLC. All rights reserved.
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram