Skip to main content
短.be

Redirect Loop

An error condition where two or more URLs redirect to each other in a circular pattern, preventing the browser from reaching any destination.

Aug 28, 2025 · About 1 min read

Redirect

A redirect loop occurs when URL A redirects to URL B, and URL B redirects back to URL A, creating an infinite cycle that prevents the browser from ever reaching a final destination. Browsers detect this condition after a set number of redirects (typically 20) and display an error message such as "This page isn't working" or "Too many redirects."

Redirect loops are a common configuration error that can arise from misconfigured server rules, conflicting redirect directives, or circular DNS settings. A frequent cause is conflicting HTTP-to-HTTPS and HTTPS-to-HTTP rules, where the server alternates between protocols indefinitely. Another common scenario involves www and non-www redirects that contradict each other. Server configuration books on Amazon cover debugging techniques.

In URL shortening, redirect loops can occur if a short URL's destination is set to another short URL that eventually points back to the original. Well-designed shortening services detect and prevent circular references during link creation by checking whether the destination URL resolves to the same service.

Diagnosing redirect loops requires tracing the full redirect path using tools like curl with the -L flag, browser developer tools, or online redirect checkers. The fix involves identifying the conflicting rules and correcting the redirect logic to break the cycle. Web debugging books on Amazon discuss systematic approaches.

Share on XHatena

Was this article helpful?

Related Terms

Related Articles

FAQ

What are the main causes of redirect loops?
Common causes include circular redirect configurations like A → B → A, CMS permalink setting inconsistencies, and conflicting settings between CDN and origin server.
How do you resolve a redirect loop?
Check the server's redirect configuration and eliminate circular references. Inspect .htaccess, nginx.conf, and CDN settings in order, verifying the redirect destination at each step.

Ready to create a short URL?

Shorten a URL for Free