Wordpress ERR_TOO_MANY_REDIRECTS 3 WordPress

I had this problem yesterday on my WordPress multisite installation, one of the sites was giving this “ERR_TOO_MANY_REDIRECTS” error but the other site was working just fine. This really had me scratching my head as it was working fine the night before.

Solving problems like this often requires trial and error, but sometimes you can be a detective and backtrack what has changed since it last worked. In this case, the last thing I had done was I had enabled Cloudflare, but I recall it was working after that as well. But then I remember the annoying habit that Google Chrome has of OTT caching not just of pages but of DNS lookups, meaning I may well have actually tested the site properly after the switch.

So first I disabled Cloudflare, which I was sure must be the cause, but nothing changed, I was still seeing the error. then I checked the SSL, that was valid and passed all the SSLLABS tests too. Then I thought to try another browser since Google Chrome has a tendency to cache dns results as well. Voila, the site was, in fact, working with Cloudflare disabled. So I went through the Cloudflare settings and found the cause.

Wordpress ERR_TOO_MANY_REDIRECTS 4 WordPress

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.

In my case, I just switched to full (strict) mode, and installed LetEncrypt SSL on my origin server. Problem solved.

0
Would love your thoughts, please comment.x
()
x
Share This