Try the suggestions in this Community Tip to help you fix ERR TOO MANY REDIRECTS.
If your SSL setting on the SSL/TLS app is Flexible and if your origin server is configured to redirect HTTP requests to HTTPS, server responses back to Cloudflare are encrypted. 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.
Quick Fix Ideas
- Remove the HTTPS redirects in your origin server.
- Use this command to see the redirect on your origin server:
curl -ksvo /dev/null http://example.com --connect-to ::MY_ORIGIN_IP 2>&1 | egrep -i "< location|< http"
MY_ORIGIN_IPwith the IP shown on the A record of your DNS app, replace
example.comwith your domain name.)
- If you see
< HTTP/1.1 301 Moved Permanentlywhen you cURL to the origin IP, you know you have a redirect in place. You should see
< HTTP/1.1 200 OKonce you remove that origin redirect.
- You can use the same cURL command to test against the Cloudflare edge using the public IP of your site, find that using
$ ping example.com. If you have set to Always use https, you’ll receive a reply of
HTTP/1.1 301 Moved Permanentlyshowing the redirect is in place.
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.
Enable Full or Full (Strict) mode. Learn more about all the SSL options available through Cloudflare.
If You Need More Help
This community of other Cloudflare users may be able to assist you, login to Cloudflare and post your question to the Community. When you post on the Community make sure to include as much of this information as possible: the specific error message you are seeing, the URLs this is happening on, screen shot of the error, and the steps to reproduce the error. Please indicate what troubleshooting steps you’ve tried in order to help us help you.
Expert Comments Appreciated
This Community Tip will remain open for input from Community experts and those familiar with this issue. We really appreciate comments that start with words like: “The three things I always try”, or “Do this first” or “In my experience”.
This is a Cloudflare Community Tip, to review other tips click here.
Çevirme…traduzir…翻译…traducir…Traduire…Übersetzen… Translate this Tip