Skip to content
RU

ERR_TOO_MANY_REDIRECTS: How to Find and Fix a Redirect Loop

Laptop and smartphone side by side on a desk, both showing the same browser error page

What it means: The browser followed 20 redirects without reaching a page, almost always because two rules send the request back and forth.

  1. Delete cookies for this site and reload
  2. Try an incognito window
  3. If it fails everywhere: trace hops with curl -IL
  4. Switch Cloudflare Flexible SSL to Full (strict)
  5. Keep one canonical scheme and host rule

Test your URL now

Follows every redirect hop of your URL and stops on a loop.

Check the redirect chain →

What ERR_TOO_MANY_REDIRECTS means

ERR_TOO_MANY_REDIRECTS is Chromium net error -310, "Attempting to load an URL resulted in too many redirects." Chrome follows at most 20 redirects per request (kMaxRedirects = 20 in the network stack) and then stops with the page "This page isn't working. example.com redirected you too many times. Try deleting your cookies."

Everything below HTTP worked: DNS resolved, TCP connected and TLS succeeded on every hop. Each response is a valid 301, 302, 307 or 308; the problem is where they point. In practice it is a loop, such as http to https and back, or www to the bare domain and back. A legitimate chain longer than 20 hops is rare and is a bug of its own. The certificate is not the cause, even though the loop often starts right after HTTPS is switched on.

Causes in Chrome, Edge, Firefox and Safari

BrowserWhat you seeMost common trigger
Chrome"redirected you too many times", ERR_TOO_MANY_REDIRECTSProxy terminates HTTPS, origin keeps redirecting to HTTPS
EdgeThe same Chromium page and codeSame as Chrome
Firefox"The page isn't redirecting properly"Same loop; limit set by network.http.redirection-limit (20)
SafariSays too many redirects occurredSame loop

The classic loop is a TLS termination mismatch. A CDN or load balancer talks HTTPS to the visitor but plain HTTP to the origin; the origin sees an HTTP request, redirects to HTTPS, and the next request again arrives over HTTP. The second pattern is two rules that disagree: the web server sends www to the bare domain while the CMS, whose site URL is set with www, sends it back. The same happens with trailing slashes and with language or geo redirects.

Two causes live in the browser. Redirects that depend on a cookie (login, consent, locale) loop when the cookie cannot be stored, which is why Chrome suggests deleting cookies. And a site that has sent an HSTS header but now redirects HTTPS to HTTP loops because the browser rewrites every http:// request back to https:// internally (shown in DevTools as "307 Internal Redirect").

Behind Cloudflare, nginx or another proxy

Cloudflare's own troubleshooting page names three sources. With SSL/TLS encryption mode Flexible, Cloudflare connects to the origin over HTTP, so an origin that redirects HTTP to HTTPS loops forever: set the mode to Full (strict), which needs a valid certificate on the origin (a free Cloudflare Origin CA certificate works), or remove the origin redirect. With Full or Full (strict), an origin that redirects HTTPS to HTTP loops. The same applies to Always Use HTTPS combined with an origin that downgrades to HTTP, and to redirect rules that overlap with origin rules.

On nginx, give each scheme and host exactly one job, and redirect straight to the final URL:

server {
    listen 80;
    server_name example.com www.example.com;
    return 301 https://example.com$request_uri;
}
server {
    listen 443 ssl;
    server_name www.example.com;
    return 301 https://example.com$request_uri;
}
server {
    listen 443 ssl;
    server_name example.com;
    # canonical host: no scheme or host redirects here
}

When TLS ends at a load balancer, the application must read the original scheme from X-Forwarded-Proto instead of the connection. For WordPress behind a proxy, add to wp-config.php:

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

If you own the site

  1. Print the chain. curl -sIL --max-redirs 25 https://example.com/ | grep -iE '^(HTTP|location)'. The loop is visible as the same two Location values repeating; curl itself stops after 50 with Maximum (50) redirects followed.
  2. Test the origin without the proxy. curl -sI --resolve example.com:443:203.0.113.10 https://example.com/ (your origin IP). If the origin alone answers 200, the loop comes from the CDN mode or a CDN rule.
  3. Align the CMS URL. In WordPress, Settings > General (or the WP_HOME and WP_SITEURL constants) must match the canonical scheme and host exactly; other CMSs have an equivalent site URL setting.
  4. Remove duplicate rules. Search .htaccess, nginx includes, plugin settings and CDN redirect rules for scheme and host redirects; keep one place that owns them.
  5. Check HSTS against downgrades. If the site sends Strict-Transport-Security, no rule may redirect HTTPS to HTTP.
  6. Mind cached 301s. Browsers cache permanent redirects, so test fixes with curl or a fresh profile, and prefer 302 while you experiment.

If you are a visitor

Delete the cookies for this site (Chrome: the lock or tune icon in the address bar > Cookies and site data) and reload; this fixes loops that depend on a broken login or consent cookie. An incognito window is a quick test of the same idea. Because 301 redirects can be cached, clearing cached images and files also helps if the site was fixed recently.

If the loop appears in every browser and on every network, it is a server or CDN configuration error, and nothing on your device will fix it. Your system clock, antivirus and DNS settings are not involved.

How to confirm the fix

curl -sIL -o /dev/null -w '%{http_code} after %{num_redirects} redirects\n' http://www.example.com/
# expect: 200 after 1 redirects (or 2 at most)

Run it for all four entry points (http and https, with and without www); each should reach the canonical URL in one or two hops. The redirect chain checker shows every hop with its status code and target, and the HTTP status checker confirms the final page answers 200.

Related errors

Redirect ChainsEach extra redirect adds 100-300ms latency and reduces PageRank along the chain.
HTTP to HTTPSVerify the redirect is performed correctly without intermediate unencrypted hops.
Redirect LoopsCircular redirects cause ERR_TOO_MANY_REDIRECTS error and complete page unavailability.
301 vs 302 Codes301 permanently passes PageRank, 302 is a temporary redirect without passing SEO weight.

Why teams trust us

10+
redirect hops
HTTPS
redirect check
<2s
result
301/302
redirect codes

How it works

1

Enter URL

2

Redirect chain followed

3

Codes & final URL shown

Redirect checker: optimize redirect chains

Incorrect or long redirect chains slow down the site, lose PageRank and confuse search crawlers. The tool visualizes the full redirect chain with response codes and timing for each hop.

Full hop chain

Shows each redirect step: URL → code → URL → code, through to the final destination.

Time per hop

Measures latency at each redirect step for precise identification of performance bottlenecks.

Redirect type

Distinguishes 301, 302, 303, 307, 308 — each has different behavior for SEO and browsers.

Loop detection

Automatically detects circular redirects and warns before the browser throws an error.

Who uses this

SEO

redirect chain audit

Developers

301/302 debugging

DevOps

HTTPS redirect check

Marketers

UTM link tracking

Common Mistakes

Chains of 3+ redirectsHTTP → HTTPS → non-www → www — that's three redirects instead of one. Merge them into a single direct redirect.
Using 302 instead of 301302 for permanently moved pages means losing PageRank. Use 301 for final migrations.
Redirecting HTTP to HTTP before HTTPSAn intermediate unencrypted hop creates an MITM vulnerability and adds an extra request.
Not updating internal linksRedirects are not a substitute for updated links. Links to original URLs should be updated directly.

Best Practices

Use one redirect: HTTP+www → HTTPS+non-wwwConfigure a single nginx/Apache rule combining both conditions into one 301 redirect.
Check redirects after migrationsDomain change, HTTPS migration, URL structure redesign — all create new redirect chains.
Remove stale redirectsRedirects accumulated over years create hidden chains. Audit .htaccess and configs quarterly.
Control redirects in sitemapSitemap should only contain final URLs without redirects — otherwise crawlers waste crawl budget.

Get more with a free account

Redirect check history and API for automated chain auditing.

Sign up free

Learn more

Sources

Frequently Asked Questions

How many redirects does Chrome allow?

Twenty per request; Firefox uses the same default. curl follows up to 50 when told to follow redirects.

Does clearing cookies really fix ERR_TOO_MANY_REDIRECTS?

It fixes loops that depend on a cookie, such as a login or consent redirect, which is why Chrome suggests it. A loop caused by server or CDN rules comes back immediately.

Why did the loop start after I enabled Cloudflare?

Most often the SSL/TLS mode is Flexible, so Cloudflare reaches your origin over HTTP and the origin's HTTPS redirect sends every request back. Switch to Full (strict) with a valid origin certificate.

Why does the site work on my phone but loop on my laptop?

The laptop likely has a stale cookie, a cached 301 or an HSTS entry the phone lacks. Test in a private window; if that works, clear the site's data in the normal profile.

Can HSTS cause a redirect loop?

Yes, if the server redirects HTTPS to HTTP while the browser enforces HSTS: the browser upgrades every request back to HTTPS. Remove the downgrade rule; deleting the HSTS entry only hides the problem for one browser.

Try the live tool that powered this guide

Free plan — 10 monitors, checks every 5 min, no card required. Upgrade for 1-minute interval and multi-region monitoring.