Troubleshooting Guides

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.

By CheckDomainHealth Editorial Team Reviewed by Dionis Ceban Updated Jun 28, 2026 9 min read Intermediate

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

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

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.

  1. Run curl -IL on http:// and https:// versions of the domain.
  2. Test both www and non-www hostnames.
  3. Note each status code and Location header in order.
  4. Check whether the chain repeats the same URLs.
  5. Use HTTP Header Checker to inspect response headers at each hop.
  6. Compare origin response with CDN/proxy response.
  7. If WordPress, check Settings → General for siteurl and home.
  8. 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.

Run Website Status Check →

Common problems

HTTP and HTTPS redirect conflict

High

The 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

High

Both 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

High

CDN 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

High

WordPress 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

Medium

Multiple RewriteRule blocks redirect the same requests in conflicting ways.

Next step: Consolidate redirects into one clear canonical rule set.

Nginx and application both redirect

Medium

Server-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

Medium

The 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

Medium

Legacy 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

Medium

SEO, 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

Low

Edge cache still returns an outdated redirect target or loop.

Next step: Purge CDN cache and retest from a private browser window.

How to fix

  1. 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.

  2. Step 2: Identify where redirects are generated

    Determine whether the loop starts at CDN, web server, reverse proxy, WordPress or a plugin.

  3. 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.

  4. Step 4: Fix HTTP to HTTPS rule

    Keep a single HTTPS enforcement rule. Remove duplicate HTTP redirects from server, CMS and CDN.

  5. Step 5: Fix www/non-www rule

    Redirect only the non-canonical hostname to the canonical one. Do not redirect both ways.

  6. Step 6: Check WordPress siteurl/home

    If the site runs WordPress, confirm both values exactly match the canonical HTTPS URL.

  7. Step 7: Remove duplicate redirect layers

    Disable or delete conflicting rules in .htaccess, Nginx, plugins, page rules and reverse proxy config.

  8. Step 8: Purge cache and CDN

    Clear CDN, reverse proxy and browser cache so old redirect responses are not reused.

  9. 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

Trace redirects with curl
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.

Use these free tools to verify your configuration after applying changes.

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.

Get Help Run Domain Health Check

Was this guide helpful?

Your feedback helps us improve our guides for everyone.