Troubleshooting guide · wordpress · Published 2026-08-15 · 5 min read

Fix WordPress ERR_TOO_MANY_REDIRECTS

Where WordPress gets stuck in ERR_TOO_MANY_REDIRECTS, and the ordered fixes for double HTTPS, cached redirects, CDN SSL mode, htaccess and cookie loops.

Symptoms

The browser tab says ERR_TOO_MANY_REDIRECTS and the WordPress site never renders. The same URL loads on a different network, or over http, or in a private window, because those requests do not hit the same rules. The loop is usually a mix of three layers fighting each other: the web server, the WordPress site URL, and a CDN or security plugin.

What an ERR_TOO_MANY_REDIRECTS loop sounds like

ScenarioTypical rule chainLikely cause
http://example.com bounces to https://example.com and backHTTPS redirect + site URL still httpScheme mismatch at the application layer
Works on private window, loops in normal browserSet-Cookie no longer validCookie rule or security plugin
Works direct to host, loops through CDNEdge and origin both force HTTPSDouble HTTPS, or edge sets its own scheme
Loops only on a specific subdomain or pathRewriteRule in .htaccessA hardcoded host in the rewrite

How to fix, in order

  1. Reset to a known-good URL. The most common fix is forcing the request out of the loop by temporarily bypassing the redirect. Use a plugin, a wp-config.php define, or the host tool to look at the site and site URL values first:
SELECT option_value FROM wp_options WHERE option_name IN ('siteurl','home');

Both must match what the browser types, scheme and www included. If they are wrong, correct them (or wp search-replace after a moved domain), purge, and the loop usually dies.

  1. Check the HTTPS layer. Ask: who redirects http to https, the web server, the plugin, the CDN, or WordPress itself? If two layers force HTTPS, the origin answer can be http while the edge answers https, so the origin sends the visitor to an https URL that the edge then reforces, and the loop is a self-feed. Choose exactly one owner and tell the other to stop. In Cloudflare the SSL mode matters too: Full strict demands the origin certificate match, while Flexible makes the edge forward HTTP to the origin, which can loop when the origin still forces HTTPS.
  2. Clear the cached redirect. The loop may not be live at all; a page cache, object cache, or CDN copy of the 301/302 lives for a day or more. Purge the caches (URL, prefix, and the WAF/edge cache), then test from a fresh network. A loop that survives the purge is real.
  3. Inspect .htaccess or the nginx config for a repeating rule. A real loop needs two rules that fight each other. The common accidental pair is a www rule and a non-www rule, where the first adds www and the second strips it:
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://www.%{HTTP_HOST}/ [L,R=301]

RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^ https://%{HTTP_HOST}/ [L,R=301]

Each request matches the opposite rule, so the visitor bounces between the two hosts forever. Pick one canonical host and delete the other block. Two identical conditional rules (a duplicated HTTPS redirect, for instance) do NOT create a loop on their own, because a request that is already https matches neither condition. Be suspicious of any block that repeats itself, but only rewrite rules forcing opposite states actually self-feed. On nginx the same mistake is a duplicated return 301 inside a location or server block.

  1. Fix the cookie-based loop. A security plugin sets a cookie and then requires it on the next request, but the cookie never lands (blocked storage, or a caching layer serving the response without the Set-Cookie header). If a cache plugin is caching the login page, add /wp-login.php to its exceptions so the login path is served uncached, then clear the login cookie for that site and retry in a private window.
  2. Test the raw chain to confirm you broke it:
curl -sI --max-redirs 5 http://example.com/

The final hop should be a 200 (or a 301 to www if that is your design), not a binary loop. Repeat over https:// and the bare domain.

Prevention

When to involve a professional

If the loop persists with a plain URL, no plugin involved, and the CDN mode already strict, the site might have a Nagios-style redirect file, a redirect service (a metered CDN or security suite) in the path, or a DNS CNAME chain that loops a host. That is a hosting-layer problem, best solved with the host's reverse proxy diagnostics in hand.

Need a website built, fixed, optimised, migrated or replaced?

This technical resource is written by CSMBAC, a small design and development studio. If you would rather hand the problem to a professional, the website service page explains how we build enquiry-ready websites.

Explore website services