Error
Try the suggestions in this Community Tip to help you fix ERR TOO MANY REDIRECTS.
Background
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"
- Replace
MY_ORIGIN_IP
with the IP shown on the A record of your DNS app, replaceexample.com
with your domain name.) - If you see
< HTTP/1.1 301 Moved Permanently
when you cURL to the origin IP, you know you have a redirect in place. You should see< HTTP/1.1 200 OK
once 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 ofHTTP/1.1 301 Moved Permanently
showing 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.
Lite Reading
https://support.cloudflare.com/hc/en-us/articles/115000219871-Troubleshooting-redirect-loop-errors
Background Resources
Help Center
YouTube
Research The Issue
Community
Google
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
FXRDCT 101819