Why do I see redirect loop errors?

Cloudflare SSL modes can cause redirect loops depending on certain configurations in the origin server. 

For instance, with the Flexible SSL mode, all traffic between the browser and Cloudflare is encrypted over HTTPS.  By enabling Flexible SSL, you are telling Cloudflare to send all requests between Cloudflare and the origin web server over HTTP (not encrypted).

If the origin server happens to be configured to redirect HTTP requests to HTTPS, server responses back to Cloudflare are encrypted and since Cloudflare is expecting HTTP traffic, it keeps resending the same request, resulting in a redirect loop. This causes browsers to display The page isn’t redirecting properly or ERR_TOO_MANY_REDIRECTS errors.  

The same issue can occur if using the Full or Full(strict) SSL modes, the only difference being that Cloudflare will only be contacting your origin web server over HTTPS.  Therefore, if redirect loop errors instead occur while using Full or Full(strict),  confirm whether you origin web server is redirecting HTTPS traffic to HTTP.

To resolve this issue, remove either the HTTPS to HTTP or HTTP to HTTPS redirects from your origin web server configuration. You can do this for:

To ensure all requests between the browser and Cloudflare are encrypted, you can use an Always Use HTTPS page rule and that way avoid a redirect loop.

If you host a Wordpress site, read about potential issues with Flexible SSL.

Learn more about all the SSL options available through Cloudflare.



Not finding what you need?

95% of questions can be answered using the search tool. This is the quickest way to get a response.

Powered by Zendesk