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.
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
Use the Redirect Chain Scanner above to identify which exact URLs and status codes form the circular loop.
Change Cloudflare encryption mode from 'Flexible' to 'Full' or 'Full (Strict)' so communication with your origin uses HTTPS.
Configure your origin reverse proxy to inspect 'X-Forwarded-Proto: https' before triggering redirect rules.
Verification Command or Config Pattern
# 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.
Complementary Diagnostic Scanners
All 34 toolsWCAG Accessibility & Contrast Scanner
Audits foreground/background luminosity contrast ratios against WCAG 2.2 AA (4.5:1) and AAA (7:1) thresholds, detecting missing alt attributes and keyboard traps.
Robots.txt & Sitemap.xml Scanner
Verifies syntax of robots.txt files, parses nested sitemap_index.xml structures, and audits for broken URLs, conflicting directives, and 404 indexing errors.
Website Font, Color & Asset Scanner
Crawls live stylesheets to extract distinct hex color palettes, webfont load methods (WOFF2/FOUT metrics), and total uncompressed asset payload distribution.
Related Troubleshooting & RFC Playbooks
How to Fix SPF PermError: 'Too Many DNS Lookups' (RFC 7208)
Resolve the 10-lookup limit that causes receiving mail servers (Gmail, Outlook) to reject your emails.
How to Fix NET::ERR_CERT_AUTHORITY_INVALID SSL Handshake Errors
Repair broken intermediate certificate bundles and establish a trusted X.509 chain of trust.
How to Fix 'No Access-Control-Allow-Origin Header is Present' CORS Errors
Configure cross-origin preflight responses and secure credential sharing across APIs and single-page apps.