ERR_TOO_MANY_REDIRECTS. The browser says the page "has been redirected too many times" and refuses to load anything. If your domain runs through Cloudflare, the most common cause is a mismatch between Cloudflare's SSL mode and your server's own HTTPS redirect rules.
What the browser is telling you
ERR_TOO_MANY_REDIRECTS (Chrome) or The page isn't redirecting properly (Firefox).
This is not a certificate problem. The certificate can be completely valid and the loop still happens. The issue is that two pieces of your stack keep sending the request back and forth between HTTP and HTTPS, and neither one ever serves actual content.
The classic Flexible mode loop
.htaccess, Nginx config, a WordPress plugin, or the CMS settings), it sends a 301 or 302 redirect back to the HTTPS version. Cloudflare receives that redirect, follows it, and connects to your server over HTTP again, because Flexible mode always uses HTTP to the origin. Your server redirects again. Loop.
The sequence looks like this:
- Visitor requests
https://example.com(hits Cloudflare). - Cloudflare connects to origin at
http://example.com(Flexible mode). - Origin sees HTTP, sends 301 redirect to
https://example.com. - Cloudflare follows the redirect, connects to origin at
http://example.comagain. - Origin sends another 301. Repeat until the browser gives up.
Trace the loop with curl before changing anything
curl with the -IL flags to follow redirects and print only the response headers. This shows you the exact chain.
BASH
curl -IL https://example.com 2>&1 | grep -i 'HTTP/\|location:'TEXT
HTTP/2 301
location: https://example.com/
HTTP/2 301
location: https://example.com/
HTTP/2 301
location: https://example.com/location: URL repeating, that confirms a loop. The redirect target never changes, which means the request keeps bouncing between the same two states.
You can also add -v for verbose output to see whether Cloudflare headers like cf-ray or server: cloudflare are present, which confirms the request is going through Cloudflare's proxy.
One thing to watch for: your browser caches 301 redirects aggressively. If you already tested in a browser, clear the cache or use a private/incognito window after making changes. Old cached redirects will make it look like nothing changed even after you fix the server.
Fixing the mismatch
Option A: Change Cloudflare's SSL mode to Full or Full (Strict)
curl again. You should see a single HTTP/2 200 instead of a chain of 301s.
Option B: Remove the server-side HTTPS redirect
Common places where redirect rules hide
.htaccess(Apache/LiteSpeed): Look forRewriteRulelines that check%{HTTPS} offor%{SERVER_PORT} 80and redirect tohttps://. There may be multiple.htaccessfiles in subdirectories.- Nginx config: Look for
return 301 https://hostrequest_uri;orif ($scheme = http)blocks in your server block for port 80. - WordPress settings: The
siteurlandhomevalues inwp_options(database) or inwp-config.php. If both are set tohttps://, WordPress itself will try to enforce HTTPS. A plugin like Really Simple SSL or a security plugin may also add redirect logic. - Cloudflare Page Rules or redirect rules: A page rule with "Always Use HTTPS" or a bulk redirect rule can add another layer of redirection. If your origin is also redirecting, you can end up with a double redirect (not a loop, but unnecessary hops).
- cPanel "Force HTTPS Redirect": cPanel has a toggle in the Domains section that injects an
.htaccessredirect. Turning it off removes the rule.
.htaccess also forces HTTPS, and Cloudflare's Always Use HTTPS is on. With Full (Strict) mode, all three are harmless (the request is already HTTPS by the time it hits the origin). With Flexible mode, any one of the server-side rules creates the loop.
Verifying the fix
curl command:
BASH
curl -IL https://example.com 2>&1 | grep -i 'HTTP/\|location:'HTTP/2 200 or at most one redirect (for example, from https://example.com to https://www.example.com) followed by a 200. If you still see a repeating chain, something is still redirecting on the origin side.
Also test in a fresh incognito browser window. If curl shows a clean 200 but your regular browser still loops, the browser has a cached 301. Clear the browser cache for that domain or wait for the cache to expire.
The short version
curl -IL shows you the exact chain before you start changing settings.