redirects

Redirects and SEO: All you need to know

What are redirects?

A redirect – short for ‘redirection’ – is an action where a website visitor is sent to an alternate page to the one they originally requested.

When a redirect has been set up, users that visit the original URL will be automatically sent to the new URL, whether they realize it or not.

The two most commonly used redirects are:

  • 301 redirect – a permanent redirect
  • 302 redirect – a temporary redirect
301 vs 302 redirect

Although both redirects have the same outcome for users, these two redirect codes have different impacts on SEO.

When it comes to passing the link equity (a.k.a. “link juice), in theory, both 301 and 302 should pass 100% of PageRank. (In the past, some PageRank losses were common with every redirection but it changed in 2016.)

But it doesn’t mean they should be used carelessly and interchangeably. Each redirection carries some SEO risk, as there are many factors that come into play.

In most cases, the 301 redirect is the best and safest method to use when redirecting one page to another, if the change is permanent. 

When search engines come across a 301 redirect, not only do they know to pass on any page rank from the old URL to the new URL, but they will also work on removing the old URL from their index.

On the other hand, when it comes to a 302 redirect, search engines will know that this is just a temporary change and not remove the old URL from their index. So they should be used only if the change is really temporary (e.g. website maintenance).

Why are redirects important?

Redirects are fundamental to how websites are maintained and impact how users find content on the internet.

Let’s look at an example.

The homepage URL for Mangools’ site in full form is “https://mangools.com/”.

Anybody that tries to access our homepage through alternative URLs – such as any from the list below – will automatically be redirected to our homepage URL.

  • mangools.com
  • www.mangools.com
  • http://mangools.com
  • https://www.mangools.com
  • https://mangools.com

This happens because there are redirects that are automatically set up on the site. For example, all http URLs redirect to the https equivalent, and www- URLs redirect to their non-www URL equivalent.

As demonstrated in this example, redirects work to ensure that users can find the correct version of a page, or alternative versions of pages that may have existed in the past.

In more complicated cases, URLs may be updated to reflect a change in website architecture, moving URLs to a brand new domain name, or merging two or more pages onto a new page.

Regardless of the reasoning behind needing to implement a redirect, it is important to note that website visitors – whether they are a real person or a bot – are impacted in the same way by redirects.

Although redirects are generally used as best practices for website management – and SEO – it is crucial to ensure that redirects are used correctly.

Types of redirects

When it comes to redirects, there are two types to be aware of – server-side and client-side redirects. Although it is not necessary to know the technicalities of these, it is important to understand the differences.

1. Server-side redirects

Server-side redirects are exactly as they sound. Redirects are managed by the server, and when called upon, redirect users from an old to the new URL.

Besides the most commonly used types we mentioned above – 301 and 302 redirects – there are additional status codes such as 303, 307 and 308 that you may also come across. Although these have their own use-cases, they are less frequently used and considered in exceptional use-cases.

2. Client-side redirects

Where server-side redirects are implemented by the server, client-side redirects are indicated by a webpage source code and therefore implemented by the browser.

Two examples of client-side redirects are meta refresh redirects and JavaScript redirects.

a) Meta refresh redirects

A meta refresh redirect is a meta tag that is placed in the header section of a URLs HTML document, usually telling the browser to redirect after a certain amount of time. Meta refresh redirects are easy to implement, but not good from an SEO point of view.

You may have come across these pages on the internet already, where they usually tell you to click a link if you have not been redirected within 5-10 seconds.

b) JavaScript redirects

JavaScript redirects occur on sites built with JavaScript only, yet are similar to meta refresh redirects, in that the browser uses source code to perform a redirect.

Like meta refresh redirects, JavaScript redirects are detrimental to SEO, and can be perceived as cloaking in some instances.

How to implement redirects on a website

Now that we’ve discussed some different aspects of website redirects, it’s time to learn how to go about implementing redirects on a website.

For this consideration, we are going to discuss server-side redirects, in the form of 301 and 302 redirects only.

Typically, managing redirects has required knowledge of accessing and editing server configurations. But with most website content management systems, it is easier than ever.

Plugins

Most CMSs allow the use of plugins, to enhance functionality for a wide range of elements.

With WordPress, for example, there are plugins that will allow you to manually add and remove redirects, with little knowledge of computer science.

WordPress Plugins

Redirection – is a redirect manager for WordPress, making it easy to manage redirects and keep track of 404 errors.

The interface is very simple and straightforward:

redirection plugin wordpress

Alternatively, RankMath is an all-in-one SEO tool that has redirection management built-in also.

.htaccess file

The .htaccess file is a top-level file that manages the configuration of your website. Whilst .htaccess files have the ability to manage just about any element of a website, this can also prove risky if you don’t know what you are doing.

However, with access to the .htaccess file, it is possible to redirect single URLs, URLs across an entire domain, or apply flexible redirection across a site.

Here’s a great Htaccess 301 Redirect Rules guide by Linchpin. If you’re not sure what you’re doing, it’s always better to ask a professional for help since incorrect redirection can do a lot of harm.

Best practices for managing redirects

Now that you know more about the different types of redirects, the impact on SEO and how to implement them,l et’s take a look at some pointers regarding the best practices associated with redirects.

1) Remove 301 redirects from your sitemap

Once you’ve implemented a redirect, you no longer need the URL that you are redirecting from. To avoid search engines crawling the old URL unnecessarily, ensure that you remove the old URL(s) from your XML sitemap.

2) Update links to the correct version of your site

With internal links between pages on a website, you should always use the full URL in the correct form. This means including http or https, using “www” as necessary and ensuring you include the trailing slash if it exists.

Every time you don’t copy the destination URL exactly as it appears in the browser, you risk creating an unnecessary redirect chain!

Fix redirect chains and loops

As your website grows, and pages are removed and redirected, it should become a habit to regularly audit your whole site for redirect chains and loops, and fix them accordingly.

Take a look at the next chapter to learn the most common redirecting mistakes and how to fix them.

Implement redirects for 4XX

The same as above should be applied to 4XX errors. In cases where pages can’t or shouldn’t be replaced, ensure that they redirect to a relevant, alternative URL. If this can’t be done, at the very least, ensure that they redirect to your homepage.

Use server-side 3XX redirects instead of meta refresh

When implementing redirects, ensuring that they are server-side redirects as opposed to client-side redirects are beneficial for both your users and SEO. In most cases, there is no reason why this shouldn’t be the case!

Common redirect issues

A simple redirect directs users from an old URL to a new URL without any additional points. However, as more redirects get implemented on a website, it is common for redirect errors to occur.

There are three main redirect issues to be aware of:

  • Redirect chains
  • Redirect loops
  • Broken redirects

Redirect chains

A redirect chain is when more than one redirect occurs to move users from the starting URL to the destination URL.

For example, if a redirect goes from URL A to URL B, and another redirect goes from URL B to URL C, then two redirects are occurring in a chain sequence. To fix this, a redirect should be updated so that users are redirected from URL A to URL C.

redirect chain

Redirect chains usually occur accidentally as multiple redirects are implemented across a website.

Of course, redirect chains can be much longer and complex than the example shown. But in any case, any redirect chain is going to have an impact on SEO.

Every time that search engine crawlers come across a link, they work to crawl and index content within the URL. For every URL that they encounter within a redirect chain, is time wasted by crawler bots. This can lead to issues with crawling and indexing across a site.

Redirect loop

This is similar to a redirect chain, where multiple redirects are at play, but instead, the final redirect loops back to the starting URL.

redirect loop

Redirect loops can occur very much in the same way as redirect chains, as additional redirects get implemented on a website. However, in this case, users and search engines never actually reach a final destination and are stuck within the loop.

This has the same negative effect as redirect chains, and it is also a lot more frustrating for users.

Broken redirects

Broken redirects occur when an internal redirect tells users to go to a new URL, yet the URL doesn’t exist. This will usually result in users coming across a 404 or 5XX error, which has negative consequences for both users and search engines.

Fixing broken redirects usually requires fixing the broken target page, or updating the redirect to point to an alternative page.

How to find redirect issues

Before you can fix any redirect issues, you need to be able to identify them.

Finding redirect issues manually across a site is not easy, but can be made easier with the use of third-party tools.

There are of course many different tools that can help, but here are a few that are easy to get started with.

Website auditing tools

Website auditing tools (such as SEO Spider by Screaming Frog or Sitebulb) have their own website crawlers that allow you to identify and audit different aspects of a website, related to SEO.

They will also allow you to identify additional 3XX errors, as well as any 4XX and 5XX errors along the way.

redirect chains report

Google Chrome extension

Both of the previous examples use external software to identify redirects. But sometimes it is convenient to check redirects on the go.

For that, you can use a tool such as the Ayima Redirect Path – that can be added to your Google Chrome browser for free. This allows you to monitor any redirects in real-time, and identify any unnecessary redirect chains or loops that might also be present, without leaving your browser.

Google Search Console

If you have Google Search Console set up for your website, it is a great place to find information regarding the SEO state of your website.

Google Search Console won’t directly tell you about any redirect chains or redirect loops that are present on a website, but it will alert you to any issues via the ‘Coverage’ tab in the main menu, or the ‘Crawl Stats’ in the ‘Settings’ tab.

This makes it possible to identify where redirects are present, as well as any 404 and 5XX errors also.