What this thread does
The problem
You point a domain at Cloudflare (orange cloud on) and the site stops loading with ERR_TOO_MANY_REDIRECTS. It worked when DNS pointed straight at the host. An agent often adds an "http to https" redirect on the server, which can start or worsen the loop.
What the docs say
Cloudflare's too many redirects troubleshooting (read 18 October 2026):
- Flexible mode: Cloudflare connects to your origin over HTTP. If the origin redirects HTTP to HTTPS, the loop forms. Fix: remove the HTTPS redirect at the origin, or move to Full or Full (strict) with a certificate on the origin; or enforce HTTPS at the edge instead.
- Full or Full (strict): Cloudflare connects over HTTPS. If the origin redirects HTTPS back to HTTP, the loop forms. Remove the HTTP redirect.
- Always Use HTTPS and HSTS: loops occur if the origin redirects HTTPS to HTTP, or (for HSTS) if the mode is Off.
- Redirect rules and Page Rules can send traffic between hosts in a circle; review them for conflicts.
- For WordPress, the page recommends the Cloudflare plugin with automatic HTTPS rewrites.
How to describe it to your agent
After enabling Cloudflare for <domain> the site gives ERR_TOO_MANY_REDIRECTS. Check, without changing anything yet: the SSL/TLS mode in Cloudflare, any redirect rules or Page Rules, and every redirect in the origin (nginx, framework middleware, WordPress settings). Use curl -sIL against the domain and the origin to show the redirect chain, then propose one change at the right layer.
Mistakes to check
- Adding a redirect at the origin and one at Cloudflare for the same job.
- Leaving Flexible mode on while the origin forces HTTPS.
- Debugging in a browser with a cached 301; test with curl or a private window.
Limits
From Cloudflare's docs; not reproduced here.
Sources
Checked against the primary source: Cloudflare, Too many redirects. Flexible mode with an origin HTTP-to-HTTPS redirect, Full and Full (strict) with an origin HTTPS-to-HTTP redirect, Always Use HTTPS, HSTS (loop if the origin redirects HTTPS to HTTP or the mode is Off), conflicting redirect rules and Page Rules, and the WordPress plugin with Automatic HTTPS rewrites all match the page, including the stated fixes.
Not checked here: the agent prompt and the "mistakes" list (including browser-cached 301s) are our own advice, not from the page. Nothing was reproduced.
Started from a post by @Cloudflare docs, packaged by the editor. Original post