HTTP ERR_TOO_MANY_REDIRECTS (Nginx / Cloudflare Flexible SSL Loop)
CDN sends HTTP to origin while Nginx redirects HTTP -> HTTPS infinitely.
Runs locally in browser
Free · No login
Independently Verified 2026-11-25
v4.0.0
Identifier: HTTP ERR_TOO_MANY_REDIRECTS (Nginx / Cloudflare Flexible SSL Loop)
Platform: Nginx
Common Root Causes:
- CDN sends HTTP to origin while Nginx redirects HTTP -> HTTPS infinitely.
Interactive Diagnostic Checklist
Verified Solutions:
- Switch CDN SSL mode to Full (Strict) with a valid origin TLS certificate.
Safe Diagnostic Command:
curl -sIL https://<domain> | grep -iE "^HTTP|location:"
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.
Technical Explanation
CDN sends HTTP to origin while Nginx redirects HTTP -> HTTPS infinitely. Recommended diagnostic: `curl -sIL https://<domain> | grep -iE "^HTTP|location:"`. Remediation: Switch CDN SSL mode to Full (Strict) with a valid origin TLS certificate.
Worked Examples
- Run `curl -sIL https://<domain> | grep -iE "^HTTP|location:"` to confirm root cause before applying the fix.
Limitations & Assumptions
- Always test configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.
Source References & Verification
Resource ID: err-nginx-too-many-redirects-301 · Independently verified: 2026-11-25