A redirect loop occurs when Cloudflare and the origin disagree about the expected scheme or hostname. Trace the actual Location responses before changing several HTTPS settings at once.
IN THIS ARTICLE
Gather the details you will need
Back up redirect configuration and record the Cloudflare encryption mode, application URL and any www canonicalisation. Use a fresh browser or a request tool that shows each redirect hop.
01 Fix a Cloudflare HTTPS redirect loop
- Request the failing URL and record the sequence of HTTP status codes and Location values. Identify whether the loop alternates HTTP/HTTPS or different hostnames.
- If Flexible mode is used while the origin forces HTTPS, prepare a valid origin certificate and move to Full (strict). Flexible’s HTTP origin connection can trigger the same redirect repeatedly.
- Check the application’s canonical URL, trusted-proxy configuration and server redirects for contradictory rules.
- Review Cloudflare Redirect Rules and Always Use HTTPS alongside origin rules. Remove only the conflicting behaviour and keep one coherent destination.
- Retest nested paths, login and forms, then clear a cached redirect where necessary after confirming the configuration is correct.
Check the HTTPS result
The request should reach the intended HTTPS page through a short redirect chain. Test both hostname variants and confirm query strings remain intact where required.
If the problem continues
If the loop persists, inspect a Worker or plugin that also redirects requests. Do not disable all HTTPS permanently to mask a configuration conflict. Restore the previous known configuration if an experimental change broadens the outage.
Why can the browser still loop after I fixed the rule?
A permanent redirect may be cached locally or at another layer. Confirm the live response with a fresh client before concluding that the corrected server rule is still wrong.