Site AI Auditpar Internet Solutions

Finding Redirect Chains and Loops on Your Website

20 août 20268 min de lectureBases du SEO
Finding Redirect Chains and Loops on Your Website

Short answer: A redirect chain is a series of redirects, such as A to B to C, before a visitor reaches the final page. A redirect loop is a chain that never ends because it circles back, such as A to B to A. Chains slow pages down and may not be followed to the end by crawlers; loops make the page completely unreachable. Fix chains by pointing every old URL directly to the final destination and updating internal links, and fix loops by finding the conflicting rules and removing one.

What a redirect chain looks like

Redirect chains rarely appear on purpose. They build up as a website changes over the years. A typical history:

  1. In 2019, the page lives at http://example.com/services.html.
  2. The site moves to HTTPS, so http:// redirects to https://example.com/services.html.
  3. A new CMS drops the .html ending, so that URL redirects to https://example.com/services/.
  4. The company decides to use www, so that redirects to https://www.example.com/services/.
  5. Services are split up, and that page redirects to https://www.example.com/services/bookkeeping/.

Someone following an old link to the original address now goes through four redirects before landing on the page. Each redirect was correct when it was added. Together, they form a chain.

Chains also appear within a single request, for example when the server first redirects HTTP to HTTPS and then a second rule adds www, instead of doing both in one step.

Why redirect chains are a problem

What a redirect loop is

A redirect loop happens when redirects point to each other so the final page is never reached. The simplest example: /page-a/ redirects to /page-b/, and /page-b/ redirects back to /page-a/. Browsers detect this after a number of attempts and show an error such as “This page isn’t working – redirected you too many times” (ERR_TOO_MANY_REDIRECTS).

Unlike chains, loops are always serious: the page is unreachable for everyone, including search engines. Common causes include:

How to find chains and loops

For a single URL, use one of these quick methods:

For a whole site, use a crawler. It reports internal links that point to redirects, the number of hops each one takes, and any loops. Also check:

How to fix redirect chains

  1. List every chain with its starting URL, each hop and the final destination.
  2. Update the redirect rules so each starting URL points directly to the final destination. In the example above, http://example.com/services.html should redirect straight to https://www.example.com/services/bookkeeping/. Keep the intermediate URLs redirecting to the final page too, because they may also have links.
  3. Combine protocol and host rules. Configure the server so a request to http://example.com/ goes to https://www.example.com/ in one redirect, not two.
  4. Update internal links. Menus, footers, content, canonical tags and the sitemap should all use the final URLs, so visitors and crawlers never hit a redirect from inside your own site.
  5. Ask for key external links to be updated. If an important partner or directory links to an old URL, a quick e-mail asking them to update the link removes the chain at the source.
  6. Re-test. Crawl again and check a few old URLs by hand.

Example: flattening a chain

Here is how the redirect rules from the earlier example look before and after flattening. Every old address now leads to the final page in a single step:

Old URLBefore (next hop)After (final destination)
http://example.com/services.htmlhttps://example.com/services.htmlhttps://www.example.com/services/bookkeeping/
https://example.com/services.htmlhttps://example.com/services/https://www.example.com/services/bookkeeping/
https://example.com/services/https://www.example.com/services/https://www.example.com/services/bookkeeping/
https://www.example.com/services/https://www.example.com/services/bookkeeping/unchanged, already one hop

Nothing is removed. Each rule simply points further, to the page that exists today.

How to fix redirect loops

  1. Identify the loop. Trace the URL with curl or developer tools to see which addresses repeat.
  2. Find where each redirect comes from. It could be the server configuration (such as .htaccess or nginx rules), the CMS settings, a plugin, the CDN or the hosting control panel. Check each layer; loops usually come from two layers disagreeing.
  3. Decide on one source of truth. For example, let the CDN or server handle HTTP to HTTPS and www, and remove the same logic from the CMS or plugin.
  4. Check SSL mode on CDNs. If a CDN connects to your server with HTTP while your server forces HTTPS, switch the CDN to a mode that connects over HTTPS, with a valid certificate on the server.
  5. Clear caches. Browsers cache 301 redirects. After fixing, test in a private window or with curl, and purge CDN and plugin caches.

Always make a backup of configuration files before editing them. A typo in server redirect rules can take the whole site offline.

Preventing chains in the future

How Site AI Audit helps

Site AI Audit follows links through your site the way a search engine does and reports broken links and redirects in its SEO section, along with the pages where they appear. Its first step also checks the connection and SSL setup of your site, which is where many loops begin. Findings are explained in plain words with a fix for each. Start a free check, and see the plans if you want to re-check after every fix.

Related reading

The bottom line

Redirect chains are the slow build-up of years of site changes; loops are conflicts between systems that each think they are in charge. Point every old URL straight to its final destination, make internal links, sitemaps and canonicals use final URLs, handle protocol and host redirects in one step, and manage redirects in one place. Test with curl or a crawler after every change.

FAQ

How many redirects in a chain are too many?

Ideally one. Googlebot follows up to 10 hops, but every extra hop adds delay and risk. Aim for a single redirect from any old URL to its final page.

What causes the “too many redirects” error?

A redirect loop, where URLs redirect to each other and never reach a page. It is often caused by conflicting HTTPS or www settings between the server, the CMS and a CDN.

Do redirect chains hurt SEO?

Short chains are processed without major harm, but they slow pages down and delay consolidation of signals. Long chains may not be followed to the end. Shortening them is a simple improvement.

Should I remove old redirects to clean up?

Not if the old URLs still get visits or have links. Instead, update old redirects to point straight to the final URL. Removing them turns old links into errors.

Why does the loop only happen for some visitors?

Cached redirects, cookies and login state can make loops appear only for some browsers or users. Test in a private window and with curl to see the behaviour without cached data.

#Redirects#Site migration#Technical SEO
Vérifiez votre propre site — gratuitement.Ce qu’il faut corriger sur votre site — et par où commencer.
Commencer gratuitement

Plus d’articles du blog

Tous les articles →
Internet Solutions

Plus de notre équipe

Conçus par Internet Solutions. Découvrez nos autres produits — chacun vous fait gagner du temps à sa manière.

internet-solutions.net ↗
Site AI Audit
Aperçu de la confidentialité

Ce site utilise des cookies afin de vous offrir la meilleure expérience utilisateur possible. Les informations des cookies sont stockées dans votre navigateur et remplissent des fonctions telles que vous reconnaître lorsque vous revenez sur notre site et aider notre équipe à comprendre quelles sections du site vous trouvez les plus intéressantes et utiles.