Fixing ERR_TOO_MANY_REDIRECTS and Redirect Loops
Fix ERR_TOO_MANY_REDIRECTS caused by HTTP/HTTPS conflicts, www redirects, WordPress URL issues, CDN SSL modes, .htaccess rules and reverse proxy settings.
Introduction
ERR_TOO_MANY_REDIRECTS means the browser followed a chain of redirects until it gave up. In most cases the site is not down — two or more redirect rules are fighting each other.
Common causes include HTTP and HTTPS rules applied twice, www and non-www bouncing between each other, WordPress siteurl/home mismatches, duplicate .htaccess or Nginx rules, CDN SSL mode conflicts, and reverse proxies that do not pass the correct protocol headers.
Quick answer
Trace the redirect chain with curl -IL or Website Status Checker, choose one canonical URL (HTTPS plus either www or non-www), fix the layer that generates the loop, remove duplicate redirects from server, CMS and CDN, correct WordPress siteurl/home if needed, purge CDN cache, then test again from a clean browser session.
ERR_TOO_MANY_REDIRECTS explained
A redirect loop happens when URL A sends the browser to URL B, and URL B sends it back to A — or through a longer circle of URLs. Each hop looks valid on its own, but together they never reach a final page.
- HTTP to HTTPS conflict between origin and CDN
- www and non-www both redirect to each other
- Cloudflare Flexible SSL with origin HTTPS enforcement
- WordPress siteurl/home using a different scheme or host
- Duplicate rules in .htaccess, Nginx, plugins and CDN page rules
- Reverse proxy missing X-Forwarded-Proto or X-Forwarded-Ssl
- Old migration redirect rules still active on the new host
- Canonical plugin redirect fighting server-level redirect
- Cache or CDN edge serving an outdated redirect response
Do not add another redirect rule until you know which layer is already redirecting. Extra rules often make loops worse.
Why this matters
A redirect loop makes the entire site unreachable in the browser. Visitors see an error instead of your content, checkout flows break, login pages fail, and search engines may drop affected URLs from results.
Loops are especially common after HTTPS migrations, CDN setup, WordPress URL changes, or hosting moves when old and new redirect layers are both still active.
How to check redirect loops
Start by tracing the full redirect path from the URL that fails in the browser.
- Run curl -IL on http:// and https:// versions of the domain.
- Test both www and non-www hostnames.
- Note each status code and Location header in order.
- Check whether the chain repeats the same URLs.
- Use HTTP Header Checker to inspect response headers at each hop.
- Compare origin response with CDN/proxy response.
- If WordPress, check Settings → General for siteurl and home.
- Review .htaccess, Nginx server blocks and CDN SSL/page rules.
Trace redirect chains
Use Website Status Checker to follow redirects and see where loops or long chains start.
Common problems
HTTP and HTTPS redirect conflict
HighThe server forces HTTPS while another layer redirects back to HTTP.
Next step: Keep HTTPS enforcement in one place only and remove the conflicting rule.
www and non-www loop
HighBoth hostnames redirect to each other instead of one canonical host.
Next step: Choose www or non-www and redirect the other hostname once.
Cloudflare Flexible SSL loop
HighCDN connects to origin over HTTP while visitors use HTTPS, triggering origin HTTPS redirects repeatedly.
Next step: Switch CDN SSL mode to Full or Full (strict) and ensure origin serves valid HTTPS.
WordPress siteurl/home mismatch
HighWordPress database URLs use a different scheme or hostname than the live request.
Next step: Update siteurl and home to match the canonical HTTPS URL.
Duplicate .htaccess redirect rules
MediumMultiple RewriteRule blocks redirect the same requests in conflicting ways.
Next step: Consolidate redirects into one clear canonical rule set.
Nginx and application both redirect
MediumServer-level return 301 and CMS/plugin redirects fight each other.
Next step: Handle canonical redirects in one layer and disable duplicates elsewhere.
Reverse proxy missing X-Forwarded-Proto
MediumThe app thinks requests are HTTP behind an HTTPS proxy and keeps redirecting.
Next step: Pass X-Forwarded-Proto and configure the app to trust the proxy headers.
Old migration redirect rules still active
MediumLegacy host rules were copied to the new server alongside new canonical rules.
Next step: Remove obsolete migration redirects after mapping old URLs intentionally.
Plugin redirect conflict
MediumSEO, SSL or redirect plugins add rules on top of server and CDN redirects.
Next step: Disable conflicting plugins temporarily and test which layer causes the loop.
CDN cache serving old redirects
LowEdge cache still returns an outdated redirect target or loop.
Next step: Purge CDN cache and retest from a private browser window.
How to fix
-
Step 1: Trace the redirect chain
Use curl -IL or Website Status Checker on the failing URL and write down every hop, status code and Location header.
-
Step 2: Identify where redirects are generated
Determine whether the loop starts at CDN, web server, reverse proxy, WordPress or a plugin.
-
Step 3: Choose one canonical URL
Decide the final public URL: HTTPS plus either www or non-www. Every other variant should reach it in one step.
-
Step 4: Fix HTTP to HTTPS rule
Keep a single HTTPS enforcement rule. Remove duplicate HTTP redirects from server, CMS and CDN.
-
Step 5: Fix www/non-www rule
Redirect only the non-canonical hostname to the canonical one. Do not redirect both ways.
-
Step 6: Check WordPress siteurl/home
If the site runs WordPress, confirm both values exactly match the canonical HTTPS URL.
-
Step 7: Remove duplicate redirect layers
Disable or delete conflicting rules in .htaccess, Nginx, plugins, page rules and reverse proxy config.
-
Step 8: Purge cache and CDN
Clear CDN, reverse proxy and browser cache so old redirect responses are not reused.
-
Step 9: Test again
Retest http, https, www and non-www variants until each reaches the canonical URL in one or two hops without looping.
Examples
curl -IL http://example.com
curl -IL https://www.example.com
curl -IL http://www.example.com
# Look for repeating Location headers
# Example loop:
# Location: https://example.com/
# Location: http://example.com/
# Location: https://example.com/
Change only one redirect layer at a time and retest. Editing server, CDN and WordPress rules simultaneously makes loops harder to diagnose.
Frequently asked questions
What does ERR_TOO_MANY_REDIRECTS mean?
The browser stopped because it followed too many redirects in a row, usually because two or more rules send the request back and forth between URLs.
Can Cloudflare Flexible SSL cause redirect loops?
Yes. Flexible SSL can make the origin think the request is HTTP while the visitor uses HTTPS, which often creates an HTTP-to-HTTPS loop with origin redirect rules.
How do I find which layer is redirecting?
Use curl -IL or HTTP Header Checker to inspect each hop. Compare server headers, CDN headers and WordPress or plugin redirects.
Should I redirect both www and non-www?
Pick one canonical hostname and redirect the other to it once. Do not bounce between both versions.
Can WordPress siteurl and home cause loops?
Yes. If WordPress thinks the site is on a different scheme or hostname than the server or CDN, it may keep redirecting to fix the mismatch.
Is a redirect loop always a DNS problem?
Usually not. Redirect loops are most often caused by server, CMS, CDN or reverse proxy configuration conflicts.
How many redirects are too many?
Browsers typically fail after about 20 redirects. Even before that, more than one or two hops to the final URL should be simplified.
Related tools
Use these free tools to verify your configuration after applying changes.
Related guides
Browse all Troubleshooting guides →Need help applying this fix?
Send us your domain, report link or issue details. CheckDomainHealth will review the request and route it to the right technical team if hands-on support is needed.
Was this guide helpful?
Your feedback helps us improve our guides for everyone.
Thanks for your feedback!