A redirect loop happens when URL A redirects to URL B, and URL B redirects back to URL A (or through a chain that eventually returns to URL A). Browsers display "ERR_TOO_MANY_REDIRECTS" or "This page isn't working" after following the loop several times. Search engine crawlers hit the same wall and abandon the page.
The result: your content becomes completely inaccessible. No user can view it. No crawler can index it. Any link equity pointing to pages in the loop is wasted.
How Redirect Loops Form
Most redirect loops come from conflicting rules in different layers of the tech stack. Each layer is correct on its own, but together they create a cycle.
HTTPS/HTTP Conflicts
The most common redirect loop pattern:
- Server rule: Redirect all HTTP requests to HTTPS
- CDN or load balancer: Connects to the origin server over HTTP
- Result: Browser → HTTPS → CDN → HTTP → Server redirects to HTTPS → CDN → HTTP → infinite loop
This happens frequently with Cloudflare, AWS CloudFront, and other CDN/proxy setups where the connection between CDN and origin uses HTTP while the CDN serves HTTPS to users.
WWW/Non-WWW Conflicts
- DNS points
www.example.comto a service that redirects toexample.com - Server rule redirects
example.comtowww.example.com - Result: Endless bounce between www and non-www
CMS + Server Rule Conflicts
- WordPress "Site URL" setting points to
https://example.com/ - .htaccess rule redirects
/to/home - WordPress internally redirects
/homeback to/ - Result: Loop between
/and/home
Trailing Slash Conflicts
- CDN normalizes URLs by adding trailing slashes
- Application removes trailing slashes via redirect
- Result:
/page/→/page→/page/→ infinite loop
How to Diagnose Redirect Loops
Step 1: Trace the Chain
Use curl to follow redirects step by step:
curl -I -L --max-redirs 10 https://example.com/page
This shows each redirect hop with its status code and destination. You'll see the pattern repeat when it loops.
Step 2: Check Browser DevTools
Open Chrome DevTools → Network tab → request the URL. Look for repeated 301/302 responses. The "Initiator" column shows the redirect chain visually.
Step 3: Test Different Variations
Try each URL variation separately to identify which one triggers the redirect:
http://example.com/pagehttps://example.com/pagehttp://www.example.com/pagehttps://www.example.com/page- With and without trailing slash
Step 4: Check Each Layer
- DNS — What does the domain resolve to?
- CDN/Proxy — Does the CDN add its own redirects?
- Web server — Check nginx.conf, .htaccess, or server config for redirect rules
- Application — Check CMS settings, routing config, and middleware
How to Fix Common Redirect Loops
HTTPS loop with CDN: Set the CDN to use "Full SSL" mode so it connects to the origin over HTTPS, matching what it serves to users.
WWW conflict: Pick one canonical form (www or non-www) and configure both DNS and server rules consistently. Don't redirect in both directions.
CMS conflict: Align the CMS URL settings with your server redirect rules. If WordPress says the site URL is https://example.com, don't have a server rule that redirects to https://www.example.com.
Trailing slash loop: Choose one format and enforce it at a single layer. Don't have the CDN adding slashes while the application removes them.
SEO Impact of Redirect Loops
Indexing failure. Google's crawler abandons pages in a redirect loop after a few attempts. The page drops from the index entirely — you'll see it reported as a redirect error in Search Console's Coverage report.
Wasted crawl budget. Every attempt to crawl a looped URL consumes crawl budget without successfully indexing a page. For large sites, this means other pages get crawled less frequently.
Lost link equity. External backlinks pointing to looped URLs pass no value. The link equity sits in a dead end until the loop is resolved.
User experience. Visitors see an error page instead of your content. Depending on the browser, they see "ERR_TOO_MANY_REDIRECTS," "This page isn't working," or a blank page.
FAQs
How many redirects before a loop error?
Browsers typically stop after 20 redirects. Google's crawler follows up to 10 redirect hops. If your chain exceeds these limits — whether it's a true loop or just an excessively long chain — the page becomes inaccessible.
Can a redirect loop affect other pages on my site?
Not directly. The loop only blocks the specific URLs involved. However, if many pages are stuck in loops, the cumulative crawl budget waste can slow indexing for the rest of your site.
How do I prevent redirect loops during site migrations?
Map every old URL to its new destination before launching. Test the redirect rules in a staging environment. Run a full-site crawl after launch to catch any loops. Pay special attention to the HTTP/HTTPS and www/non-www layers, which are where most migration loops originate.
Will Google penalize my site for redirect loops?
There's no ranking penalty for redirect loops. The affected pages simply fail to index. Once you fix the loop, Google will recrawl and reindex the pages — typically within days if the site is crawled frequently.