Redirection 301

The 301 redirect is a status code in the HTTP protocol that responds to the browser to notify it that the URL the user or crawler is trying to access has been moved (modified or deleted) and then permanently redirected to a new address

For one reason or another, you may decide to delete or modify web pages or URLs on your website

These situations are often related to the fact that the pages concerned are no longer of interest either to Internet users or to search engines

Under these conditions, you must implement certain actions to avoid the SEO problems that could arise

Among these actions is the implementation of 301 redirects.

So, in concrete terms:

  • What is a 301 redirect?
  • How can it impact the performance and the referencing of your site?
  • Under what conditions can 301 redirects be useful?
  • And how to set up a 301 redirect?

These are some of the questions that can be asked about 301 redirects and that will be developed in this guide. So let’s follow!

Chapter 1: 301 redirection – Definition and SEO impact

In this first chapter, we will essentially propose a more complete definition of the 301 redirect and above all present its impact on the SEO of your site

1.1 What is a 301 redirect?

The best way to imagine a 301 redirect is to imagine someone you know moving to a new apartment, but without transferring mail.

REDIRECTION 301 (2)

You will certainly continue to send him mail that he will never receive since he is no longer at the old address

Well, the principle remains the same for a website, a web page or even any file hosted on a URL

When you move a resource to a new URL, you need to make sure that your visitors don’t miss that resource by continuing to visit the old URL.

In SEO jargon, this is known as a 301 redirect or a permanent redirect.

Generally, a redirect is automatic. This means that when the user tries to connect to the first address, he is systematically redirected to the second address without even realizing it

It should also be said that it is not only human visitors who can consult your web pages. Search engines through their crawlers can also visit your content

If Google encounters a 301 redirect on your site, the search engine understands that the old URL is no longer accessible and will replace it with the new URL in its index

As you can already imagine, a 301 redirect is of great importance for your site

But one of the questions you are probably asking yourself is: if we are talking about a permanent redirect, is there another redirect that could be qualified as non-permanent?

Well, that’s exactly what we’ll see in the next section

1.2) What are the different types of redirections?

Redirects essentially exist in two (02) forms

  • Server-side redirects
  • And client-side redirects

1.2.1. Server side redirects

These types of redirections are called server-side redirections because everything actually happens at the server level. When a user tries to access a redirected link, the server is responsible for redirecting to the new address.

There are 2 different types of redirections on the server side:

1.2.1.1. Permanent redirections (301)

Permanent redirects, also known as 301 redirects, are used to permanently redirect an old URL to a new one

1.2.1.2. Temporary redirects (302 and 307)

A redirection is said to be temporary when the move is not made permanently. This type of redirection is called a 302 redirection. There are also 307 redirects that fall into this same category. They are similar, but differ from 302 redirects in certain respects

1.2.2. Client-side redirects

Here, the server is not solicited because the redirection is configured directly from the source code of the web page

It must be said that client-side redirections are rarely used because of the disadvantages they represent for the referencing of websites.

There are generally two (02) and it would be interesting to know them

1.2.2.1. The meta refresh redirections

The meta refresh redirection is a form of redirection set up by the implementation of the following meta tag: http-equiv=”Refresh “. Its function is to redirect the Internet user or the search engines to another URL after the expiration of a defined time (a certain number of seconds).

1.2.2.2. Redirections via Javascript

As the name already indicates, this type of client-side redirection is coded with JavaScript. Redirects via JavaScript have fallen into disuse because they are perceived by crawlers as cloaking.

These were the different types of redirects you may encounter on the Net, but in the rest of this guide, we will only talk about 301 redirects

1.3. What are the advantages of 301 redirects on the natural referencing of your site?

The obligation to use 301 redirects has become much more important in recent years due to the requirements of natural referencing

Indeed, the need to optimize a website for search engines often forces webmasters to transfer the efforts they make for the referencing of a page to another one when the latter encounters problems.

This justifies the fact that they are used in many situations

Redirects can help you in many ways to solve some of the problems that could affect the visibility and SERP ranking of your site:

1.2.1. 301 redirects help counteract keyword cannibalization

Keyword cannibalization is an SEO problem that occurs when certain elements (pages or links) of your site are optimized for the same or similar keywords

Although it results from various causes, when this cannibalization or competition occurs, it can cause serious SEO problems, namely

  • A loss of your site’s position in organic search results
  • The waste of your crawl budget ;
  • The bad use of the crawling budget allocated to your site;
  • The identification of your content by crawlers as spam;
  • Etc.as spam content by .

Faced with such difficulties, one of the solutions that can be favored is the use of 301 redirects

The tactic is simply to detect the pages or content that suffer from cannibalization and redirect them all to the one that is best optimized for the keyword in question.

1.2.2. 301 redirects can be set up to overcome the problems of duplicate content

As you know, duplicate content implies the existence of the same or similar content in several places on your site or on another website

Because of their negative influence on both the SERP ranking of your site and the user experience, it is strongly recommended to fix them quickly

To do so, one of the best solutions that exists is without a doubt the 301 redirect. In this case, it would be enough to configure 301 redirects in order to redirect duplicate content to the original page

The objective is to use 301 redirects to merge pages with poorly developed content to finally create content that covers the topic in depth

Moreover, keep in mind that the use of 301 redirects can also be used to increase the performance of the pages of your site that would not have obtained enough backlinks or traffic

1.2.3. 301 redirects can also be used to compile or redirect poor pages of your site into more viral content

The other advantage with 301 redirects is that they can be used in a content pruning strategy to merge your unsuccessful content into more viral content

This should not be a problem since with the updates of Google’s algorithms including Panda, we all know that the quality of content takes precedence over quantity

So it is well worth sacrificing some poor content into quality content that addresses in depth the theme.

And this is where 301 redirects can be useful. List your contents that do not have a good SERP ranking or that do not generate enough traffic, then redirect them to a more popular page, but that also deals with the same theme.

1.2.4. Link juice from a subdomain can be transferred to the main domain of a site by setting up 301 redirects

Blogs are an excellent way to generate traffic, but also to easily build a loyal audience. By offering well-detailed blog posts that effectively answer your visitors’ common questions, you can somehow prove your expertise in your industry

Your content will be cited on other sites and shared on forums and social networks. This will improve your backlink profile and the Domain Authority of your site

People will be more likely to trust the services or products you sell

But when all those blog posts are published on one of your sub-domains, it’s a big loss since all the traffic and backlinks you get won’t benefit your main domain name

Unless you’re limited by restrictions, it would make more sense to migrate your blog to a subdomain of your main domain

And this is where using 301 redirects can still benefit your site from an SEO standpoint.

To avoid leaving your visitors who are used to the subdomain address on a404 errorerror page, you can then set up a definitive redirect to the main domain address and thus recover all the traffic

1.2.5. Redirects allow you to combine several websites into one for better SEO performance

If you had several sites, it is sure that the idea would have crossed your mind: If you can migrate an element from a sub-domain to the main domain, can you also do it for an entire site?

Well, the answer is YES! If you are in the hotel business, for example, with a separate site for each hotel in your complex, it would be interesting to group them all together on the same domain

The idea is to gather all the traffic and backlinks obtained to a single site for more SEO impact. The “new” site will perform better from an SEO point of view and you will be able to outperform the competition quickly

1.2.6. 301 redirects also allow you to manage removed products

If you’re in the e-commerce business, you’ve probably already had to deal with products that are out of stock and you’re afraid that they won’t be available anytime soon

One of the effective solutions you can use to solve this problem is to set up a 301 redirect to a similar product. This is always better than deleting the product sheet and letting visitors land on a blank error page

1.2.7. Setting up 301 redirects allows you to notify search engines to remove your old URLs from their index for a better management of the crawl budget

If a crawler comes across a 301 redirect on your site, it automatically understands that the old URL must be removed and replaced by the new one

If they don’t, they will come across 404 error pages, which is a waste of your crawl budget and a bad user experience for human visitors

1.3) How can 301 redirects affect your website’s SEO?

Although 301 redirects can be beneficial from an SEO point of view under certain conditions they can also produce the opposite effect

Here is how a 301 redirect can sometimes have a negative impact on the natural referencing of your website:

It is known to all SEOs that backlinks obtained from social networks are considered by Google as a ranking criterion and can therefore improve the position of a site on the SERPs of the search engine

But the question that many are asking is whether 301 redirects can keep or not this valuable link juice obtained from social networks

Well, opinions are divided, but this article from SEOMix article seems to clear up the ambiguity and the answer is that you can potentially lose the SEO juice obtained from social networks by setting up 301 redirects

The SEOMix team did a test by creating a first page A that got a good number of shares on social networks. Then they redirected this page to a second page B with a 301 redirect to check if the number of shares was maintained on the new page

That’s when they noticed that the old Google+ network does seem to transfer the number of shares to the B page. This was not observed with Facebook and Twitter.

Les effets de la redirection 301 sur les reseaux sociaux

Source: SEOMix

Some people may wonder how many 301 redirects can be created on a website. Well, according to Matt Cutts there is no limit to the number of 301 redirects you can set up on your site

As long as the 301 redirect is useful for the user and is not pointed to an already loaded page like the homepage, then you can create as many as you want

However, when it comes to successive 301 redirects in a chain, the ideal would be to have only one, i.e. from page A to page B

At the limit, two successive 301 redirects (A to B and B to C) can be tolerated, but beyond that, the SEO juice is diluted. And the longer the chain of 301 redirects, the more you risk losing a good part of this link juice

Moreover, making long chain 301 redirects is like asking the indexing robots to make the same “trip” several times before crawling a page

Your crawl budget will then be wasted and the SEO of your site could take a hit

1.3. When to perform a 301 redirect?

Because of its SEO importance, a 301 redirect can be used in several conditions

1.3.1. Permanently move a page to a new URL

There may be times when pages on your site are experiencing a number of problems and you are considering deleting them

However, you don’t want to do this because that initial page or URL brings you a certain amount of traffic or contributes greatly to the success of your site

At the same time, you know that deleting these pages may diminish your user experience on your site. To avoid any problems and keep your page performance intact, you can set up a 301 redirect.

This way, anyone who visits the problematic URL will automatically be redirected to the new one. This way, you won’t have any more problems

Anyway, it all depends on why you decide to remove a page from your site

1.3.2. Transferring your site to another domain

For reasons of hosting, performance of your site manager or other, it may happen that you decide to transfer your site to another domain name

When you make this decision, one of your concerns may be how to avoid losing your site’s data.

As you might expect, 301 redirects will be necessary after the transfer to redirect users or search engines to the pages of your new domain.

1.3.3. Switching from HTTP to HTTPS

HTTPS is the most secure version of the HTTP protocol

It makes your site more secure for Internet users, which is why Google uses it as a standard for creating sites. You must therefore implement it on your site.

When you leave your HTTP URLs aside and use HTTPS URLs, you must create 301 redirects for each of these URLs

This ensures that Google will index the new protocol correctly and that users will be sent to the correct page rather than a 404 error page

If you want to learn more about how to switch from http to https, I recommend you to read the article why and how to switch from http to https

1.3.4. Redirect to avoid duplicate URLs

It may happen that in some situations your site is registered with two forms of URL addresses (non-www and www, HTTP and HTTPS, etc.)

When you are faced with such a situation, you should be concerned that there are duplicates in your URLs.

You can then set up 301 redirects for each type of URL.

Apart from these different situations in which you need to use a 301 redirect, it can also be useful when you want to

  • Merge several domains on your site;
  • Solve your problems with slashes or upper or lower case letters in your URLs
  • Redirect all language versions of your site to a single domain to automatically display the appropriate version based on the user’s location

Now that you know what a 301 redirect means and the various uses they can be put to, I invite you to learn how they are set up.

Chapter 2: How to set up a 301 redirect?

In this part, we will present the different methods of setting up 301 redirects on your website and test how they work.

2.1. What techniques are used to create 301 redirects?

Setting up a 301 redirect can be done in several ways. Thus, depending on the preferences or abilities the webmaster can use one of the following techniques:

Technique 1: .htaccess file

The .htaccess file is a file used for the configuration of your site. It is visible as a simple file named “htaccess” and allows you to configure certain instructions on your website

With this type of file, you can add or configure new features to your website.

These features can be related to

  • The security of the site;
  • Encoding characters;
  • Error pages;
  • Site performance;
  • Etc.

When setting up a 301 redirect, it can be configured according to the following steps

  • Access your htaccess file the first thing to do to configure your htaccess file is to find it. To do this, you must first access your hosting account’s control panel by logging in with FTP or cPanel File Manager. Then, you need to open your file manager and look at the root of your website to identify it.

By default, it may look like this:

Source Kinsa

Once you’ve found the file, all you have to do is configure it by adding the lines of code that correspond to what you want to achieve as a result.

  • To redirect an entire domain to your new site, you need to add the line Redirect 301 / http://www.example.com/ ;
  • When you want to redirect a single page, you must insert the line: Redirect 301 / oldpage / http://www.example.com/newpage/ ;

Note note: Learn more about the configuration of 301 redirects by consulting this documentationonce you have added the lines of code, don’t forget to save your changes.

Technique 2: Modifying the PHP header

If you are comfortable with the PHP language, you can also create 301 redirects in php using the formula :

header(“Location: https://www.twaino.com/”, true, 301);
exit();

?>

Technique 3 : WordPress

If you use wordpress, you can configure your 301 redirects in the easiest way by using plugins like

  • Redirection ;
  • Simple 301 redirect

If you want to use the plugin Redirectionplugin, you can proceed as follows

  • First, install and activate the plugin from your wordpress dashboard;
  • Then go to the “Tools” tab and select “Redirection” to start the configuration process;
  • Press the “Add New” button in the “redirects” tab to create your first redirect.

You will see four parameters displayed, you just need to fill them in to configure them

  • Source URL or Source URL: Enter here the URL to which you want to apply a 301 redirect. This way, when someone visits this page, they will be redirected to another one;
  • The Query parameters field can be left empty;
  • Target URL: As you can imagine, you need to enter the new URL to which you want visitors to be redirected here. That is, the destination URL once they land on the redirected page.

Group: This setting allows you to organize the redirects. You can leave it as default or use it to add new options to your redirects configuration.

As soon as you have finished all these changes, don’t forget to click on “Add a redirect” to finish the configuration.

If you want to use the simple 301 redirectplugin, here’s how to do it

  • Search and install the plugin “Simple 301 Redirect” then activate it;
  • Once the installation is complete, go to the location of your extensions and select “301 simple redirect” in the list that appears on your screen.
  • Fill in the different boxes that appear: In the “Request” module, put the name of the file of the page you want to redirect. In the “Destination”, write the URL to which you want the page to be redirected
  • When you finish filling in the various fields, click “save” to save the changes you just made.

Technique 4: Shopify

Shopify is an all-in-one solution to easily manage your e-commerce stores. As you would expect, the platform offers a native function to allow its users to configure 301 redirects on their e-commerce sites in a few clicks

You can find all the information you need on this official documentation of the platform

Technique 5 : Magento

Magento is an e-commerce platform with more than 250,000 merchants spread around the world. So it would be useful to present how to set up 301 redirects with the Magento platform

Well, nothing very complicated, the tool already offers an integrated URL rewriting solution rewriting solution that you can use to configure your redirects

Whatever means you use to configure your 301 redirects, you must now make sure that they work properly. A check is then necessary

2.2. how to check if your 301 redirects are working?

Once you have set up your 301 redirects, you need to verify that they are working properly. To do this, you can use various online tools, but the first reflex can be a manual check:

2.2.1. Checking 301 redirects manually

One of the methods I recommend you use to see if the permanent redirect is working is to try to go to the original URL

If you land on the new address then you have successfully completed your 301 redirect

If not, it means that you have done a bad configuration. You must then review your configuration to make it functional

2.2.2. Redirect.checker

One of these tricks would be to use the redirect.checker.

This is an online redirect checker tool that allows you to check not only 301 redirects, but also other types of redirects, namely:

  • 302 ;
  • meta fresh ;
  • Javascript.

One of the main features of this site is that it allows you to choose the browser from which you want to check.

2.2.3. Analyze the HTTP header of your page

This tool of webrankinfo tool will also allow you to know if your redirections are working properly. To use it, you just have to fill in

  • The URL of the page whose redirection you want to check
  • And the agent name from which you want the verification to be done.

Now that you know how to set up 301 redirects and how to make sure they work, let’s find out some tips you should keep in mind when creating 301 redirects on your site

Chapter 4: Some best practices to follow when setting up 301 redirects

Here are various tips you can implement to make your 301 redirects more effective

4.1. Do not submit 404 URLs to Google’s crawlers

When you set up 301 redirects, the old pages with 404 status codes technically no longer exist

So it would be better to prevent Google from crawling them anymore. This will avoid unnecessary waste of your site’s crawling budget. So remove them from your sitemap

To do this, the method to use should be like this

  • Find all the URLs on your site;
  • Determine the HTTP status code of each URL;
  • Identify the pages that present a 404 error message;
  • Go to your sitemap;
  • Make sure redirects are set up and working;
  • Then remove all pages that show a 404 error message.

4.2. check and correct any redirect chains

Chain redirects occur when there is a series of two or more redirects between the initial URL and the destination URL

In other words, before accessing the new page location, the user or search engines are forced to first go through one or more other URLs

Such a process slows down the display of the desired page and may hurt the user experience of your site

To fix this problem

  • You must first find the pages on your site that are subject to multiple redirects (you can use the httpstatus tool to do this);
  • Once the pages have been found, it will be up to you to correct the chain using one of the following methods
  • Method 1: Replace the redirect chain with a 301 redirect. In other words, remove the redirects that are between the initial page and the destination page
  • Method 2 replace the internal links of the redirected page to the final URL.

As you will see, these two methods allow both search engines and users to not waste much time before reaching the final URL

4.3. identify and remove redirection loops

Redirect loops occur when a URL redirects to other URLs in the redirect chain, sometimes leading to the creation of an infinite redirect.

This not only confuses and traps search engines, but also destroys the user experience of those who visit your website.

Redirect loops can also be identified using the online tool httpstatus.

Like the example of redirect chains, the redirect ball once identified can be solved in one of the following ways

  • Method 1 if the URL is not supposed to redirect, replace its HTTP response code with 200.
  • Method 2: If the URL is supposed to redirect, correct the final destination URL and remove the loop

4.4. Prefer 301 redirects over 302 redirects and meta refresh

Unlike 301 redirects, 302 redirects are used to make temporary moves. They cannot be used instead of a permanent redirect. Their use or not, must therefore depend on the permanent nature or not of the redirections you want to set up.

Also, according to the site SEMrushthese redirects can very well be ranked in the pagerank, but unlike 301 redirects, they are not consolidated in the Google index

As far as meta refresh redirects are concerned, it is important to remember that this is a redirect in which the meta tag is used to ask the browser to go to another URL after a certain time

They are managed in the same way as any other redirection, however their use is not recommended since they are a source of loss of time for Internet users.

4.5. Don’t use JavaScript for redirection

Although JavaScript can be used to set up redirects, it is not the best solution for setting up redirects

This is for the following reasons

  • With JavaScript redirects, the search engine first displays the content of the web pages before performing the redirect;
  • Websites often refuse to allow Google’s crawlers to crawl Java files.

Chapter 5: Frequently Asked Questions

5.1. What type of redirection should I choose?

The most used redirects are the server side redirects and there are 3 of them: 301, 302 and 307 redirects

The 301 redirect should only be used for definitive moves such as domain name change or transfer from HTTP to HTTPS

The 302 and 307 redirects are recommended for temporary moves such as the temporary out-of-stock condition of a product for example

5.2. How long should a redirect be maintained?

This is a question that often comes up even among professional SEOs

And this is what John Muellerjohn Mueller, Google’s Webmaster Trends Analyst, answers “After a few years, no one accesses the old URLs and these redirects can be removed

So if we are to base ourselves on his answer, a redirect can be maintained for at least 03 years. But this is only a recommendation and nothing conventional. So you can maintain them as long as you want.

5.3. Do 301 redirects affect the referencing of a website?

No, in normal circumstances a 301 redirect should not negatively impact the referencing of your website

However, they can affect it in certain circumstances such as

  • Creating redirects on a site at will
  • Creating long chains of redirects
  • Or creating redirect loops.

5.4. How to create a 301 redirect?

There are several methods to set up a 301 redirect depending on the configuration of your server and the CMS used to create your website

If

  • You are using the Apache server, you can directly modify the htaccess file of the site
  • You use Nginx, add a server block to the nginx.conf file;
  • Your site is running on Lighttpd, import the mod_redirect module
  • You use WordPress, install the plugin Easy Redirects Manage
  • You are using Magento, use the native URL rewriting module
  • Your site is created with Shopify, you can use the integrated module for URL redirects

5.5. When can I use a 301 redirect?

There are several reasons why you can create 301 redirects on your site, the most common of which are

  • Domain name change
  • Changing the URL
  • Merging two (02) or more sites into 1
  • The deletion of an important page;
  • Migration from HTTP to HTTPS
  • Repair of duplicate URLs due to slashes or non-www version of the site
  • Etc

5.6. Do 301 redirects transfer PageRank from the old URL to the new one?

The answer is YES! 301 redirects allow you to keep the link juice and PageRank of a page when it is redirected to another. This is the reason why 301 redirects are used so much

In summary

301 redirects allow webmasters to ensure both the availability of their website and the preservation of the user experience for the benefit of Internet users

They also allow them to benefit from the performance of their site despite the difficulties that could arise and block the functioning of the site

Moreover, although they seem simple, they have a definite influence on SEO

In this article, I have discussed not only what it is, but also how to implement it and some useful tips to make good use of it.

I hope this content has been useful for you to understand the concept of 301 redirects and the different methods of implementation

If you have any questions, feel free to ask them in the comments

Thanks and see you soon!

Categories R

Leave a comment