What is a 301 redirect and how do I set it up?
By helloDarwin
April 23, 2018

What is a 301 redirect and how do I set it up?

The content of a website is an important part of its value to search engines; it must be dense, original and optimized. If most of the pages on your website appear at the top of the rankings when a Google query is made, it's because your efforts in terms of optimization and content creation have finally paid off.
However, search engines and their changing algorithms are a daily reminder of the need for continuous renewal to comply with the rules of SEO (Search Engine Optimization).
So what happens when you decide to change the location of a web page? Or even the entire domain name of our website? Is there a risk of losing its place in Google's results? What will happen to our netlinking (external links to our site)? Will it still be functional? And will users who have bookmarked our site still be able to access our content?

What is a 301 redirect?

301 redirection (code 301), also known as permanent redirection (moved permanently), is an essential part of any total or partial redesign of a website. Highly appreciated by web site managers, this technique enables them to change the location of a web page quickly and easily. Permanent redirection is even more appreciated, as it transmits the PageRank (search engine ranking) to maintain the natural referencing of the pages during migration.
Permanent redirection concerns both search engines and Internet users. When a user tries to access the old content of a website, his browser will use the 301 code to redirect him to the new web page. The user won't even notice the change.
On the other hand, 301 redirection is designed to warn search engine robots that the page visited has definitely changed address, and that the new URL should now be indicated in their results. In this way, 301 redirection contrasts with 302 redirection, which indicates a temporary redirection.

The difference between 301 and 302 redirects

301 and 302 codes have the advantage of being easily read by search engine robots. They are used to communicate clearly and precisely with them:
  • 301 redirection tells browsers and search engines that the web page has changed address permanently. This practice is considered Google Friendly, since the new URL will appear in search results in place of the old one, in addition to recovering its SEO history;
  • 302 redirection (or temporary redirection) is slightly different, and tells browsers and search engines that the web page has temporarily changed address. In this case, Google will note that there's no need to change its index, as the redirect can end at any time. Code 302 is used when content is temporarily unavailable, or in order to carry out relatively lengthy maintenance, while still allowing access to the content in question.
Even if there's little point in doing so, it's technically possible to leave a 302 redirect permanently without any impact on SEO. However, in the web world, it's advisable to communicate accurately with search engines.
As you can see, to redirect a web page while maintaining its natural SEO, it's essential to use a 301 redirect. This solution can be useful in a number of situations, enabling you to :
  • Change your domain name, or have several domain names coexist, while keeping the link to the old URL;
  • Redesign your site to allow access to all its content;
  • Move a page to another site directory.
Note that it is imperative to create a redirect to the new URL, as it is totally inadvisable to have two pages with identical content. If Google's robots notice a similarity between two pages, the engine will conclude that this is "duplicate content". Sites with this kind of content are heavily penalized by Google, as it has a negative impact on the relevance of search results.

How do I create a 301 redirect?

The 301 code has been implemented in the HTTP protocol to enable website managers to deliver a better user experience to Internet users. Technically speaking, the best way to use a 301 redirect is to make a change at server level in the .htaccess file.
This file is the first to be read by your Apache web server when a request is routed, so it's the best place to redirect all traffic. The use of this code is especially appreciated by search engines, as it clearly and transparently determines their intention to redirect a web page. The 301 code can be entered in 3 different ways in your server's .htaccess file:
Redirect 301 /old-address-1
RedirectPermanent /old-address-2
RedirectPermanent /old-address-3
It's advisable to avoid Javascript redirects, which can be assimilated to spam, as well as the refresh meta tag.

Test your site's performance

There are several resources available to help you perform these tests:
Another way to see if the permanent redirection is working is to type in the old address of the page concerned. If you come across the new address, then you've succeeded in your 301 mission! On the other hand, if you come across a 404 error page, there's a problem and you need to rectify it quickly, especially if it concerns a well-referenced page. Be aware that an address responding with a 404 error will quickly be downgraded, as Google tries not to offer empty pages to Internet users. It's also advisable to avoid bad or abusive redirects. This can lead to a significant drop in your website's traffic and ranking, so redirect sensibly.
In SEO terms, a well-implemented redirect preserves link juice and ensures that redirected URLs transfer their SEO value to the new address. This is particularly important when redesigning a website or changing a domain. By using 301 redirects, you signal to search engines that content has moved permanently, helping to maintain your ranking in search results.
Have an SEO project?
Get 3 quotes within 38h from pre-vetted SEO experts in Canada. Also, it's free.
Related Tags
Search engines
Website optimization

About the author

helloDarwin -


We create successful business alliances through tailor-made partnerships. Web marketing, video production, ERP/CRM integration... Whatever professional service you need for your business, helloDarwin helps you find the best service providers for your project. Free of charge, without any obligation and within 48 hours on average. We help you find grants, loans, aid and assist you throughout your digital transformation.
Get 3 proposals under 48h.