The 301 redirect loops are a rather common phenomenon in our field. Indeed, we deal with them regularly in our daily life, especially when we make a transfert plan for our customers.
To explain quickly, a transfert plan is a mapping of the current site for its redesign, which allows structuring the redirections that will be made to minimize the impact on the traffic of this redesign.
They are usually the product of several successive website migrations (although some exceptions exist, of course), and can cause technical problems for a website if not addressed.
That being said, before talking about how to manage redirection loops, it is important to go through a few notions.
What is a 301 Redirect?
A 301 redirect is an HTTP response code from the server to the browser indicating that the address it is looking for has been moved permanently. This is precisely what differentiates it from a 302 redirect, which is temporary. Indeed, the latter is generally used when a page is under maintenance. It’s a bit like the famous orange cones in Montreal that block your path and redirect you elsewhere until the work is completed (or supposed to be, anyway!).
The usefulness of a 301 redirect lies mainly in the field of SEO. Indeed, over time, a page may have accumulated a certain reputation in the eyes of Google, called Link Equity or Link Juice. Also, Moz has created a score called Page Authority, which determines how well a page of a website can position itself.
Now, let’s say we do a redesign of our site and the content of that page ends up on a new URL. In Google’s eyes, it’s a brand new page. The new kid on the block. Google doesn’t know this kid. For him, this new kid has to prove himself, and therefore has no Link Equity.
The 301 redirect comes to tell Google that no, in fact this page is the same as before, it just changed location! It’s not The new kid on the block, it’s his old friend, he just moved!
Well, I think we can leave this allegory behind. Basically, that’s the main purpose of a permanent redirect: to transfer the entire SEO weight (Link Equity) of the old URL to its new corresponding URL.
Redirect loops and redirect chains : Explanation
Now that you know what a 301 redirect is, we’ll move on to redirect chains.
The Internet has been around for a long time now. 37 years in its modern configuration, and more than 50 years if we take into account ARPAnet, its predecessor born in November 1969. During this time, many websites have been born, reached their peak, and then died. However, many websites have endured over the decades, especially corporate or institutional websites.
Let’s take the Caisse Desjardins as an example. As the cooperative has transformed and adapted over the years, its website has also followed in its own transformations. Several times, the website has been redesigned to keep up with the changing needs of its clientele, just like the company itself.
So, to do the redirects during a redesign, it’s simple, right? We take the URL of the previous version and we make a 301 redirect to the new corresponding URL.
Right ? … Wrong !
This is exactly how you end up with a redirect chain. URL A redirects to URL B, which in its turn redirects to URL C, which in its turn redirects to URL D, and so on…
This is a problem because browsers don’t like to be redirected repeatedly, and your users could end up with a “Too many redirects” error message when they try to access your site. I don’t need to tell you that this is bad for your business.
A redirect loop is a closed redirection chain. URL A points to URL B, which redirects to URL C, which redirects to URL D, which redirects to URL A.
This situation is even worse, because the indexing robot is caught in this loop, wasting its crawl budget and preventing it from crawling your important pages.
How to manage redirection loops?
The concept is very simple. Just go back from scratch and take the redirects that were done in the past and point them directly to the most recent URL. Here’s a diagram to illustrate:
On the other hand, if you break an existing redirect, make sure you go and put the right URL quickly, because if you forget one, you risk creating 404 errors on your page.
Most CMS have a dedicated section, or at least extensions, to be able to perform redirects. Here is a method for the two CMS we work with the most: Shopify and WordPress.
Managing 301 redirects with Shopify
Shopify offers a very simple interface to perform redirects. When you are in your store, simply go to Online Store, then Navigation:
Then click on “View URL redirects”:
You now have a list of the current redirects that are on your site:
This is where you can see if you have any redirect loops. If you have a URL that is in one place on the right, and in another place on the left, you have a chain, and therefore possibly a loop. So you need to break it by identifying the original URLs and pointing them all to the final URL, as explained above. To do this, you will need to create a new redirect.
Simply click on “Create URL redirect” at the top right, insert the origin URL and then the destination URL, and click on “Save redirect”. That’s it!
Managing 301 redirects with WordPress
The management of 301 redirects with WordPress is done via an extension (plugin). We recommend the Redirection plugin, by John Godley, which is very easy to use.
Indeed, the main advantage of using a plugin to make redirections is that there is need to go in the htaccess file or cPanel to make manual redirections. Just install the plugin, follow the configuration wizard, and you are ready to go!
Once in the Redirect window, click on “Add New”, enter the old URL, then the URL you want to redirect to. That’s it!