Every redirect rule you write looks correct on its own. The trouble starts when rules meet each other. A page you moved last year points at a page you moved again this spring, and now every visitor takes two hops to arrive. Or worse, two rules point at each other and the visitor never arrives at all.
Chains and loops are list problems, not rule problems, so no single rule ever looks wrong. This guide explains how both form, the one check that finds them, and how to produce a clean list with the free Redirect Rule Generator on Ovatly, then read it with fresh eyes before deploying.
Contents
- Quick answer
- What a redirect chain actually is
- What a redirect loop actually is
- Why chains and loops cause real damage
- What a rule generator checks, and what it cannot
- How to spot chains and loops, step by step
- Worked example: a three-rule list with a chain inside
- Limitations and honest tradeoffs
- Common mistakes
- FAQs
- Conclusion
- References
Quick answer
To spot a redirect chain, read your rule list and ask one question of every rule: does this rule's destination appear anywhere in the list as another rule's source? If yes, you have a chain, and the fix is to point the first rule straight at the final destination. A loop is the same check with a worse answer: A points to B and B points back to A. Be clear about the tooling: the Redirect Rule Generator does not detect chains or loops for you. It validates the shape of each rule and refuses a duplicate source path, nothing more. Detection is your own reading of the generated list, which is quick because the check is mechanical.
What a redirect chain actually is
A chain is two or more redirects in sequence. Rule one sends /old-page to /new-page. Rule two, written later, sends /new-page to /final-page. A visitor asking for /old-page is sent to /new-page and immediately sent on to /final-page. The destination is reached, so nothing looks broken, which is exactly why chains survive for years: each rule was correct on the day it was written, and nobody remembered the first rule existed when the second was added.
What a redirect loop actually is
A loop is a chain that bites its own tail. Rule one sends A to B. Rule two sends B to A. The browser follows the first redirect, then the second, then the first again, until it gives up and reports too many redirects. Nobody arrives, ever. Loops usually come from edits in two places: a rule added to a server file while an older rule covering the same paths still lives in a control panel or second config file. Each file alone looks sane; together they circle.
Why chains and loops cause real damage
A loop is an outage for every URL caught in it, full stop. A chain is slower, quieter damage: each hop is a full extra round trip between browser and server, so a two-hop chain roughly doubles the wait before the real page starts loading, and search engines spend crawl budget on hops instead of pages. One redirect per move, pointed at the final destination, is the only version with nothing to defend.
What a rule generator checks, and what it cannot
The Redirect Rule Generator takes from/to rows, each with its own status code (301, 302, 307 or 308), and outputs the finished rules in three formats: .htaccess, Nginx, and _redirects, the file Cloudflare Pages and Netlify read at the site root. While you work, it checks the shape of what you entered: a duplicate source path is refused, because one source cannot hold two rules and mean both of them.
What it does not do is follow your destinations. If a destination happens to be another rule's source, the generator has no opinion: that is a fact about the list as a whole, not about any rule's shape. The list-level check belongs to you.
How to spot chains and loops, step by step
- Enter your from/to rows in the Redirect Rule Generator, one row per move, each with its status code: 301 for permanent, or 302, 307 or 308 where those fit better.
- Generate the output in your server's format and read the finished list as a whole.
- Run the check: for each rule, search the list for its destination in the source column. A destination that appears as a source is a chain link.
- Watch for the loop shape: rule one sends A to B, rule two sends B to A. Two destinations, each the other's source.
- Fix each chain by editing the earliest rule to point at the final destination, then regenerate and re-check.
Worked example: a three-rule list with a chain inside
Suppose a small shop generates this Nginx output:
rewrite ^/old-soap$ /soap permanent;
rewrite ^/soap$ /shop/soap permanent;
rewrite ^/clearance$ /sale permanent;
Every line is well formed, and the first is the generator's standard output for a single permanent row. Now run the check. The first rule's destination is /soap. Does /soap appear as a source? Yes, in the second rule. That is a chain: /old-soap hops to /soap, then again to /shop/soap. The third rule is clean; /sale appears nowhere as a source. The fix touches one line:
rewrite ^/old-soap$ /shop/soap permanent;
Keep the /soap rule itself, because visitors may still ask for /soap directly. You removed only the wasted second hop.
Limitations and honest tradeoffs
The honest limitation sits with the tool: the generator validates shape and refuses duplicate source paths only. It does not detect chains or loops, and it knows nothing about rules living outside the list you generated. A loop split between your generated file and a hosting control panel shows up in neither read-through alone, so the check must cover every place rules can live.
The reading method is also manual, so it scales with your attention: thorough on thirty rules, a spot check on three thousand. And a generated list is only a claim until it runs, so test the rules after deploying.
Common mistakes
- Trusting the generator to catch logic errors. It checks shape, not sense. A list can be perfectly formatted and still contain a loop.
- Fixing a chain by deleting the middle rule. That strands everyone who uses the middle path directly. Collapse the first rule instead.
- Reading rows in the entry form instead of the finished list. Chains show only when sources and destinations sit side by side in the output.
- Checking only one file. Rules hide in
.htaccessfiles, server configs,_redirectsfiles and dashboards, and a loop needs one rule in each of two places. - Deploying without a live test. Request the old URL afterwards and confirm one hop to the final destination.
FAQs
Does the Redirect Rule Generator detect chains or loops automatically? No. The generator validates the shape of each rule and refuses a duplicate source path, but it does not follow destinations to see whether they land on another rule. Detecting a chain or loop means reading the finished list yourself, which takes a minute once you know the one check to run.
What is the difference between a redirect chain and a redirect loop? A chain is a sequence: rule one sends path A to path B, and rule two sends path B to path C, so visitors hop twice. A loop is a circle: A points to B and B points back to A, so visitors bounce forever and the browser eventually gives up with a too-many-redirects error.
Why are chains worth fixing if the visitor still arrives? Every extra hop is another request, another delay, and another rule that can break later. Search engines follow chains, but each hop dilutes the signal and wastes crawl effort. One rule pointing straight at the final destination does the same job with none of the moving parts.
How do I fix a chain once I find one? Collapse it. If A redirects to B and B redirects to C, change the first rule so A redirects directly to C, and keep the B to C rule only if B itself still receives visitors. The destination stays identical; only the wasted hop disappears.
Can a chain form without me writing one? Yes, and it is the most common way they appear. You redirect an old page to its replacement, then months later the replacement moves and gets its own redirect. Nobody wrote a chain on purpose; two correct rules written at different times combined into one.
Conclusion
Chains and loops are never written on purpose; they are what correct rules turn into over time. The defence is one mechanical check, run every time a list changes: no destination may appear again as a source, and no two rules may point at each other. Generate the list with the Redirect Rule Generator, read it once with that check in mind, and deploy only when it passes. For writing a single clean rule for a moved page, see How to Redirect an Old Page to a New URL Without Losing Traffic. More guides in this series live in our Website and Webmaster Tools guides.
References
- MDN Web Docs, on HTTP response status codes, including the redirect family: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status
- MDN Web Docs, on redirection principles and the problems chains cause: https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Redirections