Why does Flexible SSL cause a redirect loop?

Cloudflare's Flexible SSL option can cause redirect loops when combined with certain configurations. Because all requests are sent to origins over HTTP when Flexible SSL is selected, an origin configured to redirect HTTP requests to HTTPS will cause a redirect loop, causing browsers to display "The page isn’t redirecting properly" or "ERR_TOO_MANY_REDIRECTS".

If you encounter this, you will need to remove redirects at your origin. Look for RewriteRules in Apache or rewrite directives/301 return directives in nginx and remove them to clear the issue.

You can replace this configuration with an Always Use HTTPS page rule to redirect all users to HTTPS without creating a loop.

 

Still not finding what you need?

The Cloudflare team is here to help. 95% of questions can be answered using the search tool, but if you can’t find what you need, submit a support request.

Powered by Zendesk