301-redirects-in-SEO

The Ultimate Guide to 301 redirects in SEO. 

Do you want to learn what is 301 redirects in SEO? If yes, you’ve landed right. In this blog post, we’ll discuss everything about 301 redirects. Let’s get started. 

What are 301 redirects in SEO?

A 301 redirect is an HTTP code that redirects an old URL to a new URL when the original page no longer exists. This is used to signal search engines as well the users that the page they are trying to reach is permanently moved to the new location. Moreover, with this code, the ranking powers of the old page are also passed to the new page. 301 redirect is a permanent code and is used to redirect the page/URL permanently.

301 redirecting seems easy, but implementing them might appear complex. Implementing improper redirects might put you in trouble and may hamper your site’s SEO as well as user experience.

Let us illustrate 301 redirects with an example: 

Suppose we have a blog post discussing the basics of SEO at the URL https://example.com/blog/seo. Later we created another blog post discussing every single detail related to SEO in the blog, the ultimate guide to SEO at the URL https://example.com/blog/the-ultimate-guide-on-seo. Now, we don’t want to keep the old blog; thus, we’ve to use the 301 redirects to send the users from the previous URL to the new URL to prevent them from reaching the “not-found” page. 

How does 301 Redirect works?

how-does-301-redirect-work-in-seo

 

Whenever someone visits the old URL, the server sends the 301 status code back to the browser and then sends you to the new URL. This process is so quick that you don’t even notice the redirecting process and land on the page that you’ve searched. However, you may easily notice that the URL on which you are, is different from what you’ve searched.

Why may you need to use 301 redirects in SEO?

There might be a variety of reasons you may need to use the 301 Redirects. The followings are a few of them-

1. You’ve moved your page to a new location

Maybe your old URL was not SEO optimized, and you want to move your page to a new URL; this may be the reason you may want to use the 301 redirects in SEO.

2. You’ve merged your pages

Maybe you have multiple pages for a similar topic, and you want to merge them to create a single, more useful content, then you may need to place a 301 redirect from the old URLs to the new URL.

3. You’re switching to a new domain

If you are migrating from your old domain to a new domain, it is necessary for you to implement a page-to-page 301 redirect from your old URL to the new URL. This will help you pass the raking powers of your old URLs to the new ones. 

4. You’ve removed your pages.

You might require to use a 301 redirect if you want to remove a web page from your site and want to direct your users to a new URL.

5. Due to broken URLs on your site

You might have discovered broken URLs on your site and want to direct users to a new location or new content. For this, you can use 301 redirects to make this process seamless.

6. You want to send users to your preferred URL.

Your users might use different URLs to reach your website. If you want to send them to your preferred URL, you can implement a 301 redirect to direct traffic from all the other URLs to your preferred URL.

Types of 301 redirects in SEO. What’s the difference?

There are different types of redirects, based on if they are permanent or temporary. These are 301, 302, 307, and Meta-refresh. Let’s discuss them one by one.

301-The Permanent Redirect

The 301 redirect is the permanent type of redirect that you can use to permanently move your old URL to a new URL. It signals search engines that the page or URL is permanently shifted to the new location. This is the most useful and efficient type of redirecting as it passes on the whole link equity to the new URL. This redirect is best for the users as well as the search engines and is recommended over its other types. You can use 301 redirecting when you want to migrate to a new domain, when you want to direct your users to your preferred URL, or when merging your content into one, etc.

302-The Temporary Redirect

The 302 redirect is the temporary type of redirect you can use when temporarily redirecting a page. These are primarily used to signal search engines that your page is moved only for a temporary period of time. There are two different versions of this, 1.0 and 1.1, and this is the 1.0 version. It is used when your page is under maintenance, when you redirect the users to another URL keeping the previous URL indexed, or you want to use the URL on your page to the content of another page. 

307-The Temporary Redirect

 The 307 HTTP 1.1 is the successor of the 302 redirects and works similarly to the 302. This signals search engines that the page is temporarily moved and will be back soon. Both work similarly, but there’s a small technical difference. Using 302 is recommended.

Meta Refresh

Meta refresh is another technique of redirecting. These are the page-level redirects rather than the server-level redirects.

Meta-redirecting loads the page normally with a 200 – OK status code. Afterwards, a script redirects the user to another page. This technique is not SEO friendly because it’s a slow process and provides a confusing user experience. They do pass link equity, but the passed link equity may get lost. 

These are popular with the “five-second countdown” with the text, click here.” 

How to do 301 redirects in SEO

Redirects can be implemented through various methods, such as using plugins or doing it from the server level itself. The best way is to do it at the server level because, in WordPress, you can’t implement a redirect going out of the box.

#Implementing redirects at the server level

Applying 301 redirects at the server level can be another challenge. This is because websites can run on different software such as Apache, Nginx, IIS, or more, which requires different methods to implement a redirect. If you don’t know the correct way for this, taking help from a web developer could be the best option.  

Here, we’ll discuss ways to implement a 301 redirect in Apache web servers. The most common method for this is editing your site’s .htaccess file, which is present in your site’s root folder.

Following are some code snippets for implementing common types of 301 redirects using .htaccess files.

1. Snippet for Redirecting an old page to a new page

Redirect301/old-page.html/new-page.html

 

2. Snippet for Redirecting an old domain to a new domain

 RewriteEngine on
 RewriteCond %{HTTP_HOST} ^oldsite.com [NC,OR]
 RewriteCond %{HTTP_HOST} ^www.oldsite.com [NC]
 RewriteRule ^(.*)$ https://newsite.com/$1 [L,R=301,NC]

Note: Check your .htaccess file before placing the code. If “RewriteEngine On” is present in your .htaccess, please don’t repeat it. Copy the rest code. You can also do it from your Cpanel. Choose whichever suits you.

 

3. Snippet for Redirecting the entire domain from non-www to www or, conversely.

  • This is the non-www to www version code:
 RewriteEngine on

 RewriteCond %{HTTP_HOST} ^example.com [NC]

 RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]
  • This is the www to non-www version code:
 RewriteEngine on

 RewriteCond %{HTTP_HOST} ^www.example.com [NC]

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

 Note: please mind the order of the code. Your site might react strangely if the code is placed wrongly.

 

4. Snippet for Redirecting the entire domain from HTTP to HTTPS

 RewriteEngine On

 RewriteCond %{HTTPS} off

 RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Note: Before placing the code, ensure that your site must have an SSL certificate for this code to work. Else, you’ll notice an alert message saying “Not Secure.”

 

5. Snippet for Redirecting the entire domain from non-www to www and HTTP to HTTPS

 RewriteEngine On

 RewriteCond %{HTTP_HOST} !^www\. [NC]

 RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

 RewriteCond %{HTTP:X-Forwarded-Proto} !https

 RewriteCond %{HTTPS} off

 RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


 

#Redirecting using WordPress plugin.

The next option to implement a redirect is using a WordPress Plugin. If you don’t want to or can’t edit the .htaccess file, you can use a WordPress plugin.

Although this is not the most suitable method for implementing redirects as plugins are slower and you have to depend on a third-party solution, there are many plugins for implementing redirects. Please note that each plugin comes with different interfaces; thus, before implementing redirects using plugins, we suggest you check the plugin documentation, whichever you are going to use. You can use “Redirection Plugin” for this purpose. It makes it simple and effortless for you to add a redirect without requiring you to edit the .htaccess file.

 

What could be the common 301 redirecting issues on your site?

To discover any redirecting issues on your site, you can use Aherf’s site audit tool. This will help you find out the issues easily so that you can fix them in a timely manner. Also, we have suggested free tools along with the errors; you can use them too. Here we’ll discuss what could be the common 301 redirecting issues on your site and their fixes.

1. Not using 301 redirects from HTTP to HTTPS version.

According to Google, every site must use the HTTPS version on sites. This is because, first, it’s a ranking signal, and second, it adds an extra layer of security that encrypts the path between a server and a user’s browser. However, it’s not enough to have HTTPS versions; you also need to redirect your HTTP version to their HTTPS counterparts. This is done using a 301 redirect.

If you have an SSL certificate, make sure to use them and redirect non-HTTPS URLs to HTTPS. 

You can also check this for your site’s homepage. Place your homepage URL with HTTP. It must redirect you to the HTTPS version. If it does, you have already implemented a redirect on your homepage. If it doesn’t redirect, please implement a 301redirect.

In addition to this, you might not have implemented a redirect across all your site’s pages from their HTTP version to the HTTPS version. Or you may have redirected pages from HTTPS to HTTP. 

Check for Ahref’s “internal page report” for this issue and place the 301 redirects appropriately.

2. Persisting 301 URLs within your sitemap

A sitemap is important for any website’s crawling and indexing. You must place your important pages in your sitemap to get them indexed. However, keeping 301 URLs in the sitemap is not a good practice. It’s unnecessary and also wastes the crawl budget that can be utilized for your site’s important pages. This is because the pages with 301 redirects are redirecting users as well as search engines to another page on your site, and keeping them in your sitemap is allowing Google to crawl them again and again, which is not necessary. Find such URLs and remove them from the sitemap.

To analyze the URLs, perform manual research if your site is new or small, or else use Ahref’s Site Audit tool’s overview report. Search the “3XX redirect in sitemap” errors and remove them from your sitemap.

You can also use a free tool for this. Use a free URL extractor tool, place your sitemap URL and extract the URLs. Now place the extracted URLs and place them into the free “HTTP status code checker” and filter the results for pages with 301 redirect code. Remove the URLs from your sitemap.

3. The redirect chains

When there are several redirects between your initial URL to the final URL, it creates a redirect chain.

To put it this way, if you redirect your page A to another page B and that Page B in return redirects to the other page C, this creates a redirect chain, and in SEO, it’s a bad practice.

According to Google, search bots can follow a redirect chain (e.g., Page A > Page B > Page C) and understand them, but it’s better to redirect the initial page to the final page directly. If not possible, keep the redirects to a maximum of three.

This is because a chain of Redirects can slow down page loading speed and will affect the user experience. Thus, whenever possible, try avoiding URL redirects.

You can use Ahref’s internal page report of the site audit tool or use the HTTP status code checker to look at the redirect chains on your site. 

Now, to fix this, you can place a single 301 redirect from the initial URL to the final URL. For instance, Page A > Page B > Page C > Page D can be Page A > Page D, or else you can replace the internal links to all the redirected pages with the direct internal links to the final preferred URL.

4. The redirect loops

A redirect loop error might occur on your site when a page in the redirect chain redirects back to one of the pages unknowingly. This results in the creation of continuous redirected loops, which can confuse as well as trap search engines and users. These are terrible from an SEO point of view as they offer a poor user experience.

Example: Page A > Page B > Page C > Page B > Page C > Page B > Page C […]

To fix the redirect loop error, you can use the HTTP status code checker and look for the “exceeded maximum numbers of redirects” errors.

Or use the Ahrefs Site Audit’s “Internal page report” to look for the redirect loop errors.

Once you find the redirected loop errors on your site, fix them quickly. Analyze if the URL is not required to redirect, and change its HTTP response code from 301 to 200.

If the URL is required to redirectassess the final destination of the redirects and place a 301 redirect directly to the final URL to remove the loops. Else, replace all the internal links to the redirected pages with the internal links to the final URL.

5. The Broken Redirects

When a page is redirected to a dead page (4XX or 5XX response code), it creates a broken page redirect error. This provides a poor experience to users as well as the search engines as both can’t assess the final URL; as a result, search engines will abandon the further crawl, and users will leave your site readily.

For Example, Page A (301) leads to Page B (404)

To check for broken redirects, you can use the HTTP status code checker or use Ahrefs’ Site Audit’s Internal page report.

Once you find any broken redirects, fix the error by redirecting to the page that is appropriate and relevant on your site or removing the internal links to the redirected URL.

6. Using 302 redirects and meta refresh redirects for permanent redirects

This issue arises when you don’t know what 301, 302, and meta redirects are and how to use them properly. We have explained what each stands for and when to use them. It’s essential to understand them when learning redirecting.

Remember that for Permanent redirects, you should never use 302 redirects or meta refresh redirects. This is because 302 are used for temporary redirects, and meta redirects are page-level redirects and are not recommended use for SEO purposes.

If you have redirected using both 302 and meta redirects, make sure you remove them or replace them with a 301 redirect.

To check for these 302 and meta refresh errors, you can use the Ahrefs site audit tool and check its “Internal Page Report”. 

To fix them, analyze the URLs carefully. If redirects are not necessary, remove the codes. If redirects are necessary and permanent, replace the 302 and meta refresh codes with 301. And, if the redirect is not permanent, you can replace the meta redirects with 302. You can also replace the internal links on the pages accordingly to direct the correct page.

7.301 redirected pages getting organic traffic

Generally, a 301 redirected page does not get web traffic as it is redirected to the other page. However, if your 301 redirected pages are getting organic traffic, this is a signal that either your pages are not redirected properly or Google hasn’t seen the redirect. 

You can check this using various tools such as Ahrefs Site Audit Tool, Google Analytics, or Google Search Console. 

In Ahrefs Site Audit Tool, look for the “Overview report” and check for the “3XX page receives organic traffic” error. In addition to this, you can check organic traffic in Google Search Console or Google Analytics. 

If you notice any 301 pages with organic traffic, firstly, you can remove those pages from the sitemap and resubmit the sitemap, and next, you can paste the URL into Google Search Console’s “URL Inspection Tool” and click the Request Indexing link. This will fasten up the indexing process, and your preferred URL will gain traffic shortly.

Please note that if you’ve recently redirected your page, Google will probably notice it when it performs the next crawl on your site. This will deindex the old page and index the redirected page.

8. The irrelevant external 301s

External linking to a third party is an SEO practice. Many websites outlink to the relevant sites and resources to provide more detailed information to enhance the user experience, which is a good practice. However, if your external links get redirected to any other irrelevant resource for any reason. This is where it all goes irrelevant, wrong, and unpleasant to your site’s visitors.

Thus, you must keep a check on the irrelevant external 301 regularly. To check this, you can use Ahrefs’ Site Audit tool. Navigate to its “External Page” report and search for the “External 3XX redirect.”

This will present a list of all the redirected external links along with the final URL where you are linked unknowingly. Check for any irrelevant URLs and fix them accordingly. Remove the external links to those irrelevant articles or link to the other relevant source.

The additional strategy with 301 redirects in SEO.

Cannibalization and Redirects

After understanding 301 redirects and all the necessary details about them, you can also use 301 redirects to boost your search presence and organic traffic to your site. This is an additional step that can help you boost your SEO using redirects. Wondering how? Let’s dive into this.

Look for the cannibalization issue on your site. It is an issue in which different pages are optimized and ranked for similar keywords. As a result, both start competing with each other by stealing each other’s traffic. You can flip this concern into an opportunity. This is how you can do this.

If you have two similar articles on your site that are performing fine with decent traffic and backlinks, consolidating both of them can help you rank higher and gain vast organic traffic to your single, more valuable content. You can do this by merging the content into one and redirecting the other link to it. 

Redirecting will help in passing the link authority and offer a single more helpful content to users.

However, always remember that this is only possible if both contents are closely related to each other. Irrelevant content must not be merged into one.

For example, A site has two contents for a similar topic.    

https://abc.com/blog/technical-seo/

https://abc.com/blog/technical-seo-tools/

Merging both of them could create more detailed content on the technical SEO guide and will boost the search presence as well as organic traffic to that site.

So, you can merge the content into one and provide it under the first link. Now since you are removing the 2 URLs from your site, you need to implement a 301 redirect to it. This will help you boost your SEO.

Final Thoughts

So, these are the details on 301 redirects in SEO. These hold great value from an SEO perspective and are vital for maintaining the website’s overall health.

301 redirects can help you signal Google about your pages that are moved to a new location so that its link equity passes on to the redirected page. These seem easy; however, implementing them could be a difficult and tiresome task. Using them appropriately will help in getting better rankings and huge organic traffic.

Here, in this write-up, we have covered all the necessary details regarding the 301 redirects in SEO, including what it is, why they are important, how they can be implemented, and some common error related to them along with their fixes. We hope this has helped you learn it easily.

Keep your site’s SEO fit using the 301 redirects and practice performing regular content audits to avoid such issues in the future.

Leave a Comment