Skip to content

SEOPart of: Redirects

ERR_TOO_MANY_REDIRECTS: how to fix a redirect loop

ERR_TOO_MANY_REDIRECTS means the page keeps redirecting in a circle, so the browser gives up. The visitor fix, and how site owners find the two rules that fight and fix them.

getReport teamUpdated 26 Sept 202612 min read

ERR_TOO_MANY_REDIRECTS is Chrome's error for a redirect loop: the page sends the browser to another address, which sends it on again and eventually back, so it never reaches a page and the browser gives up. The usual cause is two settings that disagree, such as Cloudflare talking plain http to a server that insists on https, or a server forcing www while WordPress removes it. This guide has the quick fix for visitors, then shows site owners how to find the two rules that fight and fix them. For redirects in general, start with the 301 redirects guide.

Quick answer

  • Visitor: delete the site's cookies, or open the page in a private window. If it still loops, the problem is on the site.
  • Site owner: run the address through the redirect checker and look for the addresses that repeat.
  • Cloudflare: set SSL/TLS to Full (strict) with a valid certificate on your server, not Flexible.
  • WordPress: make WordPress Address and Site Address match the server's https and www rules exactly.
  • Behind a proxy or load balancer: tell the app the request was https, or it will redirect forever.
  • One layer per decision: https, www and the trailing slash should each be decided in one place only.

What a redirect loop is

A redirect is an answer with a 3xx status and a Location header that says "ask over there instead". A redirect loop is a chain that comes back to an address it has already visited: A → B → A, or http → https → http, or /shop → /shop/ → /shop. Neither side is wrong on its own; together they never end.

Browsers stop after about 20 redirects. What you see depends on the browser:

  • Chrome and Edge: "This page isn't working. example.com redirected you too many times", with the code ERR_TOO_MANY_REDIRECTS.
  • Firefox: "The page isn't redirecting properly".
  • Safari: "Too many redirects occurred trying to open" the address.

Googlebot follows at most 10 hops, according to Google's documentation on HTTP status codes and Google Search, and Search Console lists looping URLs under Indexing → Pages as "Redirect error". A loop on your home page means Google cannot fetch it at all.

If you're a visitor: what you can try

  1. Delete the site's cookies. Some sites decide where to send you from a cookie, and a stale one can bounce you around. In Chrome, click the icon left of the address, open the site settings and delete the site's data; other browsers have the same option under privacy settings.
  2. Open the page in a private window. It starts with no cookies and no cache. If it works there, clearing cookies and cache in your normal window fixes it.
  3. Turn off browser extensions that rewrite addresses, such as privacy or HTTPS-forcing add-ons, and try again.
  4. Try another browser or device. If the loop happens everywhere, the site is misconfigured and only its owner can fix it. Let them know.

If you own the site: find the loop

1. See every hop

Browsers cache redirects, especially 301s, so test from outside your browser. The redirect checker follows every hop of an address and lists each status code; in a loop you see the same addresses repeat, and the check stops after 10 redirects.

In a terminal, curl shows the same thing:

Shell
curl -sIL --max-redirs 10 https://example.com/ | grep -iE "^(HTTP|location)"

Write down the pattern: does it flip between http and https, between www and non-www, or between a path with and without a trailing slash? That tells you which kind of rule is fighting.

2. Find out who sends each redirect

Each redirect comes from one layer: the CDN, the web server, or the application. The response headers usually give it away. server: cloudflare with no sign of your origin points at a Cloudflare rule. x-redirect-by: WordPress is added by WordPress's own redirect function, and some plugins put their own name there. A redirect with no application headers at all usually comes from the web server config.

To take the CDN out of the picture, test your server directly. Cloudflare lets you pause the site from the domain's overview page, or you can ask curl to connect straight to your server's IP address:

Shell
curl -sI --resolve example.com:443:203.0.113.10 https://example.com/

Replace 203.0.113.10 with your server's address. If the origin answers normally, the loop is between the CDN and the server.

3. Match the pattern to the cause

Pattern in the hopsUsual cause
http → https → http, behind CloudflareFlexible SSL, with the server forcing https
https → http → httpsThe server or an old rule redirects https back to http
www → non-www → wwwThe host or CDN forces one form, the CMS the other
/page → /page/ → /pageThe server adds a trailing slash and the app removes it
The same https URL over and overThe app thinks the request is http, behind a proxy
/shop/ → /shop// → /shop///A rule that also matches its own target

Fix: Cloudflare Flexible SSL

This is the most common cause. With the SSL/TLS encryption mode set to Flexible, Cloudflare serves visitors over https but talks to your server over plain http. Your server, or WordPress, sees an http request and redirects to https. Cloudflare passes that redirect to the visitor, who asks again over https, and Cloudflare again fetches the page over http. Cloudflare's own troubleshooting page for ERR_TOO_MANY_REDIRECTS lists this first.

The fix is to encrypt the second leg too:

  1. Install a certificate on your server: Let's Encrypt, or a free Cloudflare Origin CA certificate.
  2. In Cloudflare, go to SSL/TLS → Overview and set the encryption mode to Full (strict).
  3. Keep an http → https redirect. Cloudflare's Always Use HTTPS or the server rule both work once the mode is right; one is enough.

If you cannot install a certificate right now, removing the https redirect on the server stops the loop, but the connection to your server stays unencrypted. The reverse problem exists too: with Full or Full (strict), a server that redirects https back to http loops just the same; remove that rule. Cloudflare settings for speed and security covers the rest of the SSL/TLS panel.

Fix: www and https rules that disagree

When the host or CDN sends example.com to www.example.com and the CMS sends it back, neither will give way. Decide on one final form, https with or without www, and configure every layer to agree with it:

  • The server or CDN redirects everything else to that form in a single rule.
  • The CMS is set to the same form. In WordPress, Settings → General has WordPress Address (URL) and Site Address (URL); both must match the final form exactly, scheme and host included.
  • Plugins that force https or www get switched off once the server does the job.

If a wrong setting has locked you out of the WordPress admin, set the addresses in wp-config.php, which overrides the database:

PHP
define( 'WP_HOME', 'https://www.example.com' );
define( 'WP_SITEURL', 'https://www.example.com' );

Trailing slashes, www and https: pick one has the single-rule configs for nginx, Apache and Caddy, and 301 vs 302 and redirects in one hop shows how to collapse the rules so there is no chain left to loop.

Fix: the app does not know the request was https

Behind a load balancer, a reverse proxy or some managed hosts, the connection to your app is plain http even when the visitor used https. The app then redirects to https on every request. The proxy normally passes the original scheme in an X-Forwarded-Proto header; the app has to trust it.

For WordPress, add this to wp-config.php above the "That's all, stop editing" line, as described in WordPress's documentation on administration over SSL:

PHP
if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https' ) {
    $_SERVER['HTTPS'] = 'on';
}

Only do this when a proxy you control sets the header. Frameworks have the same setting under names like "trusted proxies".

Fix: a rule that matches its own target

Some rules are written so the new address also matches the rule. On Apache, the Redirect directive matches every path that starts with the given one, so this sends /shop/ to /shop//, and so on:

Apache
# Loops: /shop/ also starts with /shop
Redirect 301 /shop /shop/

Match the exact path instead:

Apache
RedirectMatch 301 ^/shop$ /shop/

On nginx, use an exact location = /shop block with return 301 /shop/;. For larger lists, the redirect rule generator writes exact-match rules for Apache, nginx, Cloudflare, Netlify, Vercel or Caddy, and points chains in your list straight at their final page, so a list cannot loop by accident.

Fix: trailing slash and plugin conflicts

A server rule that adds a trailing slash and an application that removes it loop between /page and /page/. Pick one slash policy and let only one layer enforce it; in WordPress, the permalink structure in Settings → Permalinks decides, so remove server rules that disagree.

Redirect plugins, SSL plugins and SEO plugins can also fight each other or the server. If the loop started after installing or updating one, deactivate it and test again. The guide to setting up 301 redirects on each platform covers where each kind of rule lives.

Verify the fix

  • Run the redirect checker on the address again: you want at most one redirect and then a 200 on the final page.
  • Check the variants too: http, https, with and without www. The redirect checker requests the http and other www variants for you.
  • Test in a private window, since your normal browser may still hold the looping 301 in its cache.
  • In Search Console, open the "Redirect error" group and click Validate Fix.

The full getReport report checks the redirects in front of every page:

Common mistakes

  • Turning on HSTS before the loop is fixed. HSTS makes browsers use https for your domain on their own, so an origin that redirects https to http loops with no way out for those visitors until you fix the server.
  • Fixing it in your own browser only. Clearing your cookies makes the loop disappear for you while every other visitor still sees it.
  • Adding a third rule to fix two. Remove one of the rules that fight instead.
  • Testing with the browser cache. A 301 cached before the fix still loops in that browser; use the checker, curl or a private window.

Questions people ask

What is a redirect loop?

A redirect loop is a chain of redirects that returns to an address it already visited, such as A to B and back to A, so it never reaches a page. Browsers stop after about 20 hops and show ERR_TOO_MANY_REDIRECTS or "The page isn't redirecting properly". It usually comes from two rules that each do half the job and disagree.

How do I fix ERR_TOO_MANY_REDIRECTS as a visitor?

Delete the cookies for that site, or open the page in a private window, which starts without cookies or cache. Turn off extensions that rewrite addresses and try another browser. If the error appears everywhere, the site itself is misconfigured, and only its owner can fix it, so let them know.

Why does Cloudflare cause too many redirects?

Usually because the SSL/TLS mode is Flexible: Cloudflare reaches your server over plain http, the server redirects to https, and Cloudflare fetches it over http again, forever. Install a certificate on the server and set the mode to Full (strict). A server that redirects https back to http loops the same way under Full.

How do I fix too many redirects in WordPress?

Make WordPress Address and Site Address in Settings → General match your server's https and www rules exactly. If you are locked out, set WP_HOME and WP_SITEURL in wp-config.php. Behind a proxy or Cloudflare Flexible, fix the https detection or the SSL mode, and deactivate SSL or redirect plugins that duplicate server rules.

Does a redirect loop hurt SEO?

Yes, for every URL caught in it. Googlebot stops after 10 hops, cannot fetch the page and reports it in Search Console as a redirect error, so the page cannot be indexed and eventually drops out. Fix the loop, check the address with a redirect checker, then use Validate Fix in Search Console to speed up the recrawl.

Check your site before and after Check