I had a client site that was experiencing a bot attack, so naturally, I turned to Cloudflare to mitigate it. Fortunately, it was already on Cloudflare, so all I had to do was enable the Cloudflare proxy in the DNS so it could start intercepting traffic.
But, as soon as I did this, I got a “Too Many Redirects” error when I tried to log into the site. I did what you’re supposed to do, namely, clear caches, but as soon as I did that, the home page gave that error too! I had made a bad situation worse. Strangely, other pages of the site still worked!
After a lot of Googling and semi-panic, I turned to Chat GPT, which gave the solution! Here’s what it said:
Sometimes HTTPS is enabled in WordPress, but the server (or CDN like Cloudflare) is redirecting back and forth between HTTP and HTTPS.
How to fix:
- If you’re using Cloudflare, set SSL mode to “Full”, not “Flexible”.
The Cloudflare SSL Setting
I checked and my SSL mode was indeed set to “Flexible”!
To check your SSL setting in Cloudflare, go to SSL/TLS -> Overview, then look in the “SSL/TLS encryption” section to find your “Current encryption mode”. If yours is set to “Flexible”, click “Configure”.

That will take you to the page below where you can click “Full”, then “Save”.

Once I did that, my site instantly started working! Did this work for you? Please leave a comment below! – Brian

I am a freelance web developer and consultant based in Santa Monica, CA. I’ve been designing websites using WordPress and from scratch using HTML, CSS, PHP, and JavaScript since 2010. I create websites and web applications for businesses, nonprofits, and other organizations. I have a degree in Electrical Engineering (BSEE) from California Institute of Technology and a degree in Engineering Management (MSEM) from Stanford University.
Discover more from Web Developer Tips and Tricks
Subscribe to get the latest posts sent to your email.
Please Leave a Question or Comment