Redirects are an integral part of the technical optimization of any website, be it a webshop, educational platform, or a corporate site of a large corporation.
If you have not previously used redirects and do not know how to approach the task, this guide will answer all your questions and will help you set up the right redirection rule in a particular case.
In this post, we will talk about the most popular redirects, provide examples of their use, as well as a list of potential errors and problems that may arise as a result of improper redirect configuration.
When Do You Need to Set up a Redirect?
It may happen that a particular page has been removed from your website, has become obsolete, or mistakenly duplicated. In such cases, you need to redirect a user (search engine bots) and explain a redirect reason with a particular status code.
In total, there are 10 different types of redirects, including Meta Refresh. But in practice, only a few of them are common – 301 and 302 redirects. What is special about the two? When should you resort to them?
1] 301 Redirect – Moved Permanently
301 redirects are the absolute leader when it comes to their “popularity.” It is used for permanent redirection and transfers the link weight from the start address to the end URL. As a rule, 301 redirects are used for several purposes.
- Permanent redirection of URLs of already non-existent or irrelevant pages.
- Page redirection after moving or redesigning the site.
- Combining URLs in the index of search engines. It makes sense for duplicate pages, identical versions of the same page with different protocols (HTTP and HTTPS), www prefix. and without it, as well as URLs with/without slashes at the end.
- Redirecting to a file with a changed extension.
2] 302 Redirect – Found/Moved Temporarily
The 302 redirect is used for temporary redirection and is most often configured at the stage of testing new pages and website redesign.
Pages with a 302 redirect continue to be independently indexed and exist in search engine indexes. The 302 redirect transfers the reference weight in the same way as the 301. So what’s the point in 301 vs 302 redirect if the two look so similar?
An example of using a 302 redirect is to temporarily redirect a user to a sale or promotion page without changing the original page of the product/service.
Another use case is redirecting to a mobile version of a site located on a dedicated subdomain. Since the indexing of both versions is important in this case, the 302 redirect is best suited for this purpose.
How to Configure Redirects Correctly?
To ensure the optimal operation of redirects on your site, you need to take into account a number of nuances that directly affect not only the perception of the site by search engines but also the level of users’ trust and convenience. Below is a list of the main recommendations that should be followed when setting up redirects.
1] When You Do Not Need Redirects
- Do not redirect to pages with existing redirects. Use only direct redirection. The same applies to the canonical attribute working in a combination with the redirect feature. It is not recommended to set the rel canonical attribute to a URL with a redirect or to redirect to a canonized page.
- Do not use a redirect where the canonical attribute is more appropriate. If you have two pages with almost identical content, this does not mean that they must be “linked.” It would be better to simply point out the priority URL to search robots for indexing, leaving the two pages active on the site.
- And If possible, do not put redirects on pages that are significantly different. If the search robot finds a tangible difference between the contents of the start and end URLs, the search engine may suspect you of dishonest manipulations. This, in turn, will negatively affect the SEO of individual pages and the reputation of the site as a whole.
What to Consider When Configuring Redirects?
- A type of redirect should match its purpose.
- The final URL must be accessible for indexing.
- Try to keep the old link structure. If you plan to move to a new domain and configure the corresponding redirects, try to maintain the old URL structure.
- Try to configure redirects exclusively on the server side.
- Keep in mind that indexing and splicing new URLs does not happen instantly.
- Make sure that redirects lead to pages with 200 response codes. A 200 OK response code is a prerequisite for indexing by search engines.
Final Verdict
Understanding when it is appropriate to use 301 and 302 redirects is one of the required knowledge of an experienced webmaster.
At first glance, it might seem that there is nothing bad about configuring a wrong redirect, but you may be so wrong. In order no to fail in your SEO efforts, stick to the above recommendations and constantly monitor site traffic as well as highly visited pages.