Troubleshooting · Explainer
What Causes ERR_TOO_MANY_REDIRECTS in WordPress?
Short answer
The error means the browser was sent in a loop, from one address to another and back again, until it gave up. The usual causes are WordPress Address and Site Address values that disagree, a Cloudflare SSL mode set to Flexible, two HTTPS rules fighting, or a plugin redirect that clashes with another rule.
Key takeaways
- A redirect is a 301 response with a Location header, and the error appears only when two rules point at each other in a loop.
- WordPress Address and Site Address must match exactly, including https and www, or the site can loop.
- Cloudflare Flexible mode fetches the origin over HTTP, so a site that forces HTTPS loops until the mode is set to Full or Full (strict).
- A redirect checker shows the chain, and the two addresses that repeat name the cause.
- Stale cookies can loop only wp-admin, while an address or SSL problem usually loops the whole site.
What does ERR_TOO_MANY_REDIRECTS mean?
The error means the browser was bounced between two addresses in a loop until it gave up and stopped loading the page.
A redirect is normal on its own: a server answers a request with a 301 status and a Location header that names the next address. The problem starts when that next address redirects straight back to the first one.
MDN's 301 Moved Permanently page says a browser that receives a 301 automatically requests the resource at the URL in the Location header.
The browser follows each redirect, counts them, and stops after a set number of attempts, then shows ERR_TOO_MANY_REDIRECTS in Chrome or “The page isn't redirecting properly” in Firefox. The page never loads, and the error gives no clue about which rule started the loop.
The loop can affect the whole site or only wp-admin. Full fix steps are in the guide to fix ERR_TOO_MANY_REDIRECTS.
A loop on wp-admin alone usually means a login cookie or an HTTPS rule that only applies to the dashboard, while a loop on every page points at the site address settings or the SSL setup.
What are the main causes of a redirect loop?
Five causes cover almost every redirect loop on a WordPress site.
The most common are mismatched site addresses, a Cloudflare SSL mode that does not match the origin server, two HTTPS or www rules that fight, a plugin redirect that clashes with another rule, and stale browser cookies.
The trigger is usually a recent change: an SSL certificate install, a Cloudflare setup, a site move, or a new plugin.
| Cause | Usual trigger | First sign |
|---|---|---|
| Site Address and WordPress Address disagree | Editing Settings, then General, or a migration | Loop starts right after the address change |
| Cloudflare SSL mode set to Flexible | Turning on Cloudflare or SSL | Site is behind Cloudflare and the host forces HTTPS |
| Two HTTPS or www rules fighting | Adding a force HTTPS rule or a redirect plugin | Loop after adding a second redirect rule |
| Plugin redirect clash | Installing a redirect, security, or caching plugin | Loop starts after the plugin change |
| Stale cookies or cache | Logging in or out | Loop only for one browser or only when logged in |
The first step is always to find which two addresses the browser bounces between. A redirect checker tool shows the chain, and the two addresses in it name the cause: http against https points at SSL, while www against non-www points at the address settings.
How do mismatched site addresses cause a loop?
Mismatched addresses cause a loop when WordPress thinks its address is one URL while the server serves another.
WordPress stores two addresses: siteurl, shown as WordPress Address, and home, shown as Site Address. Developer.WordPress.org's Changing the Site URL page says both settings should include the https part and should not have a slash at the end, and that the Site Address is the address people type to reach the site.
If one value uses http and the other uses https, WordPress redirects http requests to https, then the other setting redirects them back to http, and the loop runs. The same happens when one value includes www and the other does not, since WordPress treats them as different addresses.
The same page shows how to hard-code both values in wp-config.php with WP_HOME and WP_SITEURL, which overrides the database values. That fix works even when wp-admin will not load, because wp-config.php is read before the dashboard. The guide to fix broken permalinks covers a related case where the address and rewrite rules disagree.
How does Cloudflare Flexible SSL cause a loop?
Cloudflare Flexible SSL causes a loop when the proxy talks to the origin over http while WordPress forces https.
Cloudflare's SSL/TLS encryption modes page says Flexible means traffic from visitors to Cloudflare can be encrypted, but traffic from Cloudflare to the origin server is not. Full means Cloudflare matches the visitor request protocol, and Full (strict) adds validation of the origin certificate.
The same page says Cloudflare strongly recommends Full or Full (strict) to prevent malicious connections to the origin.
With Flexible mode, Cloudflare fetches the site over http, the origin sees an http request and redirects it to https, Cloudflare passes that redirect to the browser, and the browser asks again over https, so the loop repeats.
The fix is to set the Cloudflare encryption mode to Full or Full (strict), and to have a valid certificate on the origin server first.
A Let's Encrypt certificate from the host works for Full (strict), and the host panel usually offers one for free. The guide on how to set Cloudflare SSL settings for WordPress explains the settings to check in the Cloudflare dashboard.
How can two HTTPS rules fight each other?
Two HTTPS rules fight when each one redirects the request in a different direction, so neither one ever wins.
A host panel may force https, a plugin may force https, and .htaccess may hold a force https rule as well. Any one of them alone works, but two rules that disagree on www, on the trailing slash, or on the exact address can bounce the request back and forth.
A common pair is a host rule that redirects to https with www, and a plugin rule that redirects to https without www. Each redirect looks right on its own, and the loop only appears when both run. The fix is to keep one redirect and remove the rest, then clear every cache.
WordPress.org's Using Permalinks page says permalinks are the permanent URLs of posts and pages, and that the permalink structure is chosen under Settings, then Permalinks.
A permalink change can add its own redirect layer, so a loop that starts after a permalink change is worth checking there first. The guide to fix a Cloudflare redirect loop covers the case where the loop involves Cloudflare rules as well.
How can a plugin cause a redirect loop?
A plugin can cause a redirect loop when its own redirect rule clashes with a rule already on the site.
Redirect manager, security, caching, language, and membership plugins can all add redirects. A redirect plugin with a rule that points a page at itself, or a security plugin that forces https while the host already does, creates a loop that only that plugin causes.
The clue is timing: the loop starts right after a plugin is installed, updated, or given a new setting. Turning plugins off one at a time finds the one, and the loop stops as soon as the right plugin is off. The guide to fix plugin conflicts explains the one-at-a-time method.
A caching plugin can also hold a stale redirect in its cache after the cause is fixed.
Clearing the plugin cache, the server cache, and the Cloudflare cache after a fix matters, because a cached 301 can keep looping browsers even when the live rules are already right.
How can cookies cause a redirect loop?
Stale cookies can cause a loop when the browser keeps sending a login cookie that WordPress no longer accepts.
WordPress uses cookies to keep an admin logged in, and a cookie that points at the wrong address, or a cookie left over from an old address, can send the browser back to the login page again and again. The loop then affects only wp-admin and wp-login.php, while the front end loads fine.
The check is simple: clear cookies for the domain, or open the site in a private browser window. If the private window loads and the normal window loops, the cookies are the cause. If both loop, the cause sits on the server, not in the browser.
A loop that only happens when logged in points at a cookie or a plugin that runs only for logged-in users, such as a membership or security plugin.
A loop that happens for logged-out visitors too points at the address settings, the SSL mode, or the server rules. The guide to fix a login page that keeps refreshing covers the login-only case.
How do you find which two addresses are looping?
You find them by reading the redirect chain, which lists every hop the browser follows.
A redirect checker shows the chain as a list of addresses and status codes, usually 301s. A healthy chain has one or two hops and ends on the final page. A loop shows the same two addresses repeating, and the pair that repeats names the cause.
If the pair differs by http and https, the cause is an SSL setting, such as Cloudflare Flexible mode or a force https rule. If the pair differs by www and non-www, the cause is the site address settings.
If the pair is the same address twice, a plugin or server rule is redirecting the page to itself.
Check the chain in a private window first, so stale cookies do not add a false hop. Then compare the two addresses with the siteurl and home values, and with the Cloudflare SSL mode, before changing any rule.
Changing rules without reading the chain first can add a third rule to a fight that already has two.
What mistakes should you avoid?
Do not add a new force https rule before checking the ones already in place.
A site can already have a host rule, a plugin rule, and an .htaccess rule, and adding a fourth only gives the loop another rule to fight with. List the existing rules first, keep one, and remove the rest.
Do not change the site address in the database without a backup. The siteurl and home rows sit in wp_options, and a typo there locks you out of wp-admin until you fix them through wp-config.php or phpMyAdmin. Back up the database, then change one value at a time.
Do not forget the caches after a fix. A cached 301 in the browser, the plugin cache, or Cloudflare can keep looping long after the live rules are right. Clear all three, then check the site in a private window to confirm the loop is really gone.
Frequently asked questions
Why does the redirect loop affect the whole site or only wp-admin?
It affects the whole site when the loop involves the site addresses or the SSL setup, because every page goes through those settings. It affects only wp-admin when the cause is a login cookie or an HTTPS rule that applies only to the dashboard. A front end that loads while wp-admin loops points at a cookie or a dashboard-only rule.
Can installing an SSL certificate cause ERR_TOO_MANY_REDIRECTS?
Yes, a redirect loop often starts right after an SSL certificate is installed or Cloudflare is turned on. The certificate changes how the site is served, and if WordPress still thinks the address is http, or Cloudflare is set to Flexible mode, the two sides disagree and loop. Check the site addresses and the Cloudflare SSL mode first after any SSL change.
Is a 301 redirect always a problem?
No, not by itself. A 301 redirect is a normal and useful response that moves a page to a new address. The error appears only when two rules point at each other, so the browser bounces between them without ever reaching a page. One redirect is fine, and a short chain of two or three is normal.
How do I check if the loop is caused by my browser?
Clear cookies for the domain first, then open the site in a private browser window. If the private window loads, the cause was a stale cookie or cache. If it still loops, the cause is on the server, so check the site addresses, the Cloudflare SSL mode, and the redirect rules in that order.
What is the difference between Cloudflare Flexible and Full SSL mode?
Cloudflare Flexible mode means visitors connect over HTTPS while Cloudflare connects to the origin over HTTP. Full mode means Cloudflare connects over HTTPS when the visitor does, and Full (strict) also checks the origin certificate. Flexible is the mode that most often causes a loop on a site that forces HTTPS, so Full or Full (strict) is the usual fix.
Sources
- Encryption modes Cloudflare
- Changing the Site URL WordPress.org
- 301 Moved Permanently MDN Web Docs
- Customize permalinks WordPress.org
- Debugging in WordPress WordPress Developer Resources
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
