OnChainScans
ERR_TOO_MANY_REDIRECTS•RFC 9110 Section 15.4 (HTTP Status Codes)• LIVE SCANNER EMBEDDED

How to Fix ERR_TOO_MANY_REDIRECTS & Circular Redirect Loops

Diagnose infinite HTTP 301/302 redirects between Cloudflare Flexible SSL, Nginx, and CMS canonical rules.

Live Diagnostic Tool: Redirect & Canonical Chain ScannerFull Tool Page
Executive Answer & Impact Analysis

ERR_TOO_MANY_REDIRECTS is an HTTP client error triggered when a browser reaches the maximum redirect threshold (typically 15 to 20 hops) without reaching a 200 OK landing page. It is most commonly caused by circular HTTPS enforcement or conflicting canonical URL rules.

Root Cause Analysis

The classic cause is Cloudflare 'Flexible SSL' combined with server-side HTTPS redirects: Cloudflare sends requests to origin via plain HTTP, origin redirects back to HTTPS, and Cloudflare re-requests origin over HTTP indefinitely.

Step-by-Step Resolution Procedure

1Trace the Exact Hop Sequence

Use the Redirect Chain Scanner above to identify which exact URLs and status codes form the circular loop.

2Switch Cloudflare SSL to Full (Strict)

Change Cloudflare encryption mode from 'Flexible' to 'Full' or 'Full (Strict)' so communication with your origin uses HTTPS.

3Check Origin Forwarded Headers

Configure your origin reverse proxy to inspect 'X-Forwarded-Proto: https' before triggering redirect rules.

Verification Command or Config Pattern

TERMINAL / CONFIGRFC RFC 9110 Section 15.4 (HTTP Status Codes)
# Prevent circular redirect when behind a reverse proxy/CDN
server {
    listen 80;
    server_name example.com;

    # Check X-Forwarded-Proto header before redirecting
    if ($http_x_forwarded_proto != "https") {
        return 301 https://$host$request_uri;
    }
}

Frequently Asked Remediation Questions

Why does Cloudflare Flexible SSL cause redirect loops?

Under Flexible SSL, Cloudflare talks to your origin web server over unencrypted HTTP (port 80). If your origin has an 'Always use HTTPS' rule, it responds with a 301 redirect back to HTTPS, creating an infinite loop.

How do I fix ERR_TOO_MANY_REDIRECTS in WordPress?

Ensure your WordPress Site Address (URL) and Home URL match your exact protocol (https://). If using a reverse proxy, add `$_SERVER['HTTPS'] = 'on';` inside wp-config.php when HTTP_X_FORWARDED_PROTO equals 'https'.

What is the maximum number of redirects browsers allow?

Modern browsers (Chrome, Firefox, Safari) terminate connections after 15 to 20 consecutive redirect hops to prevent browser hangs and resource exhaustion.

Do redirect loops harm SEO rankings?

Yes. Search engine crawlers (Googlebot) abandon indexing when encountering circular redirects, dropping affected pages from search results.