301 Redirects | How They Work and How to Use Them for SEO

In this post, we’ll explain why 301 redirects are essential, give examples of when they should be used, show how to implement them, and highlight other redirect types.

May 15, 2023
Written by
Nate Matherson
Reviewed by
Charles Purdy

Join 1,850+ SEO and marketing professionals staying up-to-date with Positional's weekly newsletter.

* indicates required

Content marketing teams spend a lot of time building their content libraries, generating backlinks, and optimizing content for specific keywords. However, for many companies, proper technical SEO is a secondary concern.

301 redirects are one element of technical SEO, and they’re an important tool for every content marketing team. Whether you’re migrating previously published content to new permalinks on your website or moving an entire website to a new domain, 301 redirects are essential for preserving rankings, traffic, and domain authority.

In this post, we’ll explain why 301 redirects are important, give examples of when they should be used, show how to implement them on popular platforms like WordPress and Webflow, and quickly highlight some other redirect types. 

What Is a 301 Redirect?

A 301 redirect is an HTTP status code that tells search engines and browsers that a page has permanently moved, and it automatically takes users from the outdated URL to the correct URL. Unlike some other HTTP status codes, a 301 redirect signifies that the redirect or movement of a URL is permanent. 

In terms of search, 301 redirects pass link equity or PageRank from the previous URL to the new URL, which is important for maintaining domain authority.

For example, if your website is experiencing a 404 error, implementing a 301 redirect from the 404-ing page to a new URL will help you retain link equity and will help visitors navigate your website.

Why Are 301 Redirects Important?

301 redirects are important both internally and externally. As mentioned before, 301 redirects clearly communicate to Google that the location of a page has permanently changed.

Whether the 301 redirect is an internal or an external one, Google wants its users to be able to find the content they’re looking for whenever possible. If a page changes locations and a 301 redirect isn’t in place, Google’s only option is to treat the page as if it doesn’t exist anymore. 

However, if you use a 301 redirect to a new location instead, Google knows exactly how to handle the situation — you’ve told Google that the information or resource that used to live at one URL now lives somewhere else, and Google will treat the new address just as they treated the old one.

Internal, Page-Level Uses for 301 Redirects

  • When you’re deleting a page and want to preserve its SEO rankings and traffic.
  • When you’re moving an individual page to a new location.
  • When you’re replacing an obsolete page with a new one for the same or similar purposes.
  • When you’re standardizing or fixing problems with URLs (trailing forward slashes, capitalization inconsistencies, and so on).
  • When you’re reorganizing your site’s structure
  • When you're removing thin or duplicate content
  • When you want to reorganize your site structure without negatively affecting the positive results of all your SEO efforts. This works on a large scale, as well — for instance, when you’re redirecting an entire site to a new domain.

One of the biggest benefits of 301 redirects is that Google migrates the link equity and SEO strength of the old location. For instance, on your website, you might have a page that isn’t a top performer but still gets visitors and has accumulated some backlinks — you could replace it with another higher-quality page or combine the two pages without losing link equity or current ranking positions. 

Similarly, if you’re running into keyword cannibalization issues and you’re working to combine content, implementing proper 301 redirects is essential.

Domain-Level Uses for 301 Redirecting

  • When you’re migrating from one domain to another (for instance, migrating containiq.com to airplane.dev — we’ll dive into this later).
  • When you’re combining two domains — for instance, if you had a Spanish-language domain and were moving it to a subfolder on your English-language domain. This, to some extent, increases the quality of each site: they now share domain-level influence.
  • Google doesn’t treat subdomains as well as it does subfolders — it considers them more “separate.” If you’re moving from a subdomain structure to a subfolder structure, 301 redirects let you maintain rankings and authority.
  • HTTP to HTTPS shifts — a 301 redirect makes sure Google indexes the new protocol and makes sure users are redirected.

Beyond search engine rankings, 301 redirects help improve the overall user experience. They can help you to keep your user on the site by making sure they find content that’s close to what they need.

301 Redirects in Action (Domain Migration)

At our previous company, ContainIQ, we published more than 200 articles on Kubernetes, accumulated a large number of quality backlinks, and grew our traffic to more than 200,000 visitors per month. 

We then changed course — and our new direction meant that our blog on Kubernetes was no longer relevant to our business. Given that ContainIQ was driving large amounts of traffic, we wanted our blog to continue to live on. At ContainIQ, we decided to migrate our website and traffic to Airplane.dev using a 301 redirect. For Airplane, this meant that they would receive all of our content, rankings, and traffic from organic search.

During the migration, we set up a 308 redirect, which, according to Google, functions in the same way as a 301 redirect, with a few extra technical accommodations. After migrating our content from the ContainIQ CMS to the Airplane CMS, we implemented a 308 redirect, and all of our content, domain authority, rankings, and traffic shifted to the Airplane domain.

Over the coming days, Google updated the listings in organic search to reflect that the content had moved from ContainIQ to Airplane. This process typically takes a few days or a week as Google crawls the domains and processes the 301 redirects. If you’re still seeing the original page(s) appearing in organic search after multiple weeks, you should double-check that the 301 redirects were implemented correctly.

There are multiple ways to implement a redirect, so this would have worked on any publishing platform. For instance, this guide explains how to implement a 301 redirect at the domain level with Google Domains. It’s also fairly easy to do with any CMS — here are tutorials from Ghost and Webflow. More on this below!

How to Setup a 301 Redirect

Setting up a 301 redirect can be a nerve-wracking process. Fortunately, popular CMS providers make it easy for non-technical users to implement. And for more technical users, there are a number of ways to implement a 301 redirect without using a CMS.

301 Redirect Setup on WordPress

WordPress is one of the most popular CMS platforms in use today. Out of the box, there isn’t a non-technical way to implement a 301 redirect. That being said, if you are open to using a WordPress plugin, there are a number of options you can use for a non-technical implementation.

Yoast SEO Premium is a widely used plugin, and it offers support for implementing 301 redirects inside WordPress. Go to Redirects within the Yoast SEO plugin, choose the type of redirect, and copy and paste the old URL in. From there, add the new URL you’d like to redirect to:

If you aren’t already using Yoast SEO, another option to consider is the Redirection plugin by John Godley. Similar to Yoast SEO, the Redirection plugin allows you to specify the type of redirect, the source, and the target of the redirected URL:

As always, whenever installing a WordPress plugin, make sure to verify that your WordPress site is up to date with the current version. In addition, you should check to see that the plugin is being actively maintained; for example, Redirection was updated within the last month, as of this publishing.

301 Redirect Setup on Webflow

Webflow is an increasingly popular CMS platform. Unlike WordPress, Webflow users are able to set up 301 redirects directly within the platform without having to install a separate plugin.

In your Webflow account, go to settings, then go to Publishing:

Next, scroll down the page until you hit 301 redirects:

You can input the 301 redirect paths manually here. After adding the 301 redirects, you will need to republish your website on Webflow for the redirect to take effect.

301 Redirects on NGINX

For more advanced users, you can set up a 301 redirect on NGINX by adding a line to your .conf file, which is typically found at the root of your server. 

Redirect a Single Page

server {

# Permanent redirect to an individual page

rewrite ^/old-page$ http://www.website.com/new-page permanent;


Redirect an Entire Domain to Another

server {

listen 80;

listen 443 ssl;

server_name devisers.in www.devisers.in;

return 301 $scheme://www.devisers.com$request_uri;


Redirect from HTTP to HTTPS

server {

listen 80;

server_name website.com www.website.com;

return 301 https://website.com$request_uri;


Redirect From Non-WWW to WWW

server {

listen 80;

listen 443 ssl;

server_name devisers.in;

return 301 $scheme://www.devisers.in$request_uri;


301 Redirects on Apache Servers

For more advanced users, you can set up a 301 redirect on Apache servers by editing your site's .htaccess file.

By adding a line to your .conf file, which is found at the root of your server, you will be able to tell the server what to do.

Redirect a Single Page

Redirect 301 /oldpage/ https://www.sample.com/newpage/

Redirect an Entire Domain to Another

RewriteRule ^(.*)$ http://www.sample.com/$1 [R=301,L]

Redirect an Entire Site to a Subfolder

Redirect 301 / https://www.sample.com/subfolder/

Redirect a Subfolder to a Different Domain

Redirect 301 /subfolder https://www.newsample.com/

Redirect a Site Directory After a URL Change

Options +FollowSymLinks RewriteEngine On RewriteRule
^(.*)/old-category/(.*)$ $1/new-category/$2 [R,L]

Redirect From Non-WWW to WWW

RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

Redirect From HTTP to HTTPS

RewriteCond %{https} off
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]

Redirect to Trailing-Slash URLs

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_URI} !(.*)/$ 
RewriteRule ^(.*)$ http://www.sample.com/$1/ [R=301,L]

Other Types of Redirects (404, 302, Javascript)

There are a few different kinds of redirects, ranging from temporary to permanent, from the server side to the client side. Each has different implications for your site and SEO.

404 Errors

A 404 error is the generic “Sorry, can’t find that page” server-side response that you see when you enter a URL incorrectly or when a page no longer exists. That messaging is also delivered to Google’s crawlers — when Google sees a 404, it notes that the page doesn’t exist anymore and treats it as dead.

When you move or delete a page, letting the old address go to a 404 error means that everything positive associated with the URL goes away. Your site visitors don’t get sent to a useful, associated location. The SEO value of the URL vanishes. Google doesn’t reindex the page in any way. It’s just gone. For this reason, you should rarely allow a 404 error to exist when you have any other option — unless your goal is to completely delete the page.

302 Redirects

A 302 redirect is a temporary server-side redirect from a particular address to another address you choose. From a website visitor’s perspective, it takes them to another useful page automatically without them having to do any extra work. From a search engine’s point of view, it lets them know that the content has moved and will be back but that they don’t have to make any long-term changes on their end.

302 redirects are mostly used for routine maintenance purposes — sending someone to a temporary site while you do major work on your main domain, for instance.

JavaScript Redirects

A JavaScript redirect uses some amount of code to redirect a website visitor to another location. This has the advantage of being very flexible; it’s a coded solution that happens on the client (browser) side and can cover plenty of edge cases and special needs.

The disadvantages of JavaScript redirects stem from the fact that a JavaScript redirect is a complex client-side interaction. There’s more to go wrong. One of the main things that go wrong is that Google’s crawlers tend to treat pages with JavaScript redirects as 404 redirects. For the most part, you should avoid JavaScript redirects unless you have no other option.

301 Redirects vs. 302 Redirects

A 301 redirect is a permanent, server-side redirect from one location to another. As with 302 redirects, users are automatically taken to the new location without having to do anything themselves. But unlike a 302 redirect, a 301 redirect tells Google and other search engines that the change is permanent and for them to index the new URL.

Unlike 301 redirects, 302 redirects do not pass PageRank or link equity onto the destination page.

Final Thoughts

In the SEO space, many techniques are described as tricks or hacks. But 301 redirects are different—- they’re a happy example of Google wanting the exact same thing you want. 301 redirects allow you to migrate content from one location to another while preserving rankings and link equity.

For search engines, 301 redirects give their users a better search experience by indexing content correctly. And you get to keep the SEO benefits you’ve worked hard (and maybe spent money) to build. When 301 redirects are implemented correctly, there are few, if any, downsides to using them.

I hope you enjoyed this post. If you’d like to supercharge your content team, check out Positional, a modern SEO toolset meant for content and SEO teams.

Nate Matherson
Co-founder & CEO of Positional

Nate Matherson is the Co-founder & CEO of Positional. An experienced entrepreneur and technologist, he has founded multiple venture-backed companies and is a two-time Y Combinator Alum. Throughout Nate's career, he has built and scaled content marketing channels to hundreds of thousands of visitors per month for companies in both B2C (ex financial products, insurance) as well as B2B SaaS. Nate is also an active angel investor with investments in 45+ companies.

Read More

Looking to learn more? The below posts may be helpful for you to learn more about content marketing & SEO.