"ERR_TOO_MANY_REDIRECTS" after turning on Cloudflare

The site worked. You put Cloudflare in front of it. Now every page says it redirected you too many times. This is almost always one setting.

What to do, in order

  1. Open Cloudflare, SSL/TLS, Overview. If the mode is Flexible, change it to Full (or Full strict if your server has a valid certificate). Flexible makes Cloudflare talk to your server over plain http, your server answers "go to https", and the loop starts.
  2. Wait two minutes and test in a private window. Your browser caches redirects. A normal window can keep looping after the fix.
  3. Check Page Rules and Redirect Rules. A rule that forces https or www, plus the same rule on your server, can bounce visitors back and forth. Keep one, delete the other.
  4. WordPress: in Settings, General, both addresses must start with https and match exactly, www or not. If you cannot log in, set WP_HOME and WP_SITEURL in wp-config.php.
  5. Still looping: run curl -sIL https://yoursite.com | grep -i location. The list of addresses shows where the circle closes.

If it still fails, send me the address and I will tell you which step is broken.


Want the rest of your site checked after it is back? Run a free 40-point check at tinkeraudit.com.