SEO··10 min read

ERR_TOO_MANY_REDIRECTS: How to Fix Too Many Redirects

ERR_TOO_MANY_REDIRECTS means the browser was sent from one address to another so many times that it gave up. Almost always the redirects form a loop: URL A sends you to URL B, and B sends you back to A. Chrome stops after 20 redirects and shows “This page isn't working: example.com redirected you too many times.” Safari says “Safari can't open the page because too many redirects occurred”, and Firefox says “The page isn't redirecting properly”.

If you're a visitor, there are two quick things to try below. If it's your own site, the cause is a server, CDN or CMS setting, and the fix is to find the two rules that are fighting. A redirect tracer shows the loop in seconds.

Quick fixes if you're visiting the site

  1. Clear the site's cookies. A stale login or preference cookie can make a site keep redirecting you. In Chrome, click the icon left of the address bar, choose Cookies and site data, and delete the cookies for that site. In Safari on iPhone, go to Settings → Apps → Safari → Advanced → Website Data, find the site and delete it. On a Mac, use Safari → Settings → Privacy → Manage Website Data.
  2. Open the page in a private window. Private browsing starts without cookies or extensions. If the page loads there, cookies or an extension caused the loop on your normal profile.

If neither works, the problem is on the website, and only its owner can fix it. Reloading repeatedly won't help.

Find the loop on your own site

Before changing anything, look at the actual chain of redirects. Paste the URL into the Redirect Checker: it follows each hop, shows the status code and Location header for every step, and marks the URLs that repeat. Or use curl:

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

HTTP/1.1 301 Moved Permanently
location: https://example.com/
HTTP/2 301
location: http://example.com/
HTTP/1.1 301 Moved Permanently
location: https://example.com/
…

The pattern tells you the cause. Here, HTTPS keeps being sent back to HTTP, which points to an SSL setting. If the loop alternates between www and the bare domain, it's a hostname rule. If it alternates between /page and /page/, it's a trailing-slash rule. Also note which hop comes from which layer: response headers like server: cloudflare or cf-ray show the CDN issued it, while your web server's name shows the origin did.

The common causes and their fixes

1. Cloudflare “Flexible” SSL with an HTTPS redirect on the server

This is the most common cause. With Flexible SSL, Cloudflare connects to your server over plain HTTP. Your server, or WordPress, sees an HTTP request and redirects to HTTPS. The browser asks Cloudflare for the HTTPS URL, Cloudflare asks your server over HTTP again, and the loop repeats.

Fix: install a certificate on the server (most hosts provide a free one), then set SSL/TLS → Overview → encryption mode in Cloudflare to Full (strict). Other CDNs and load balancers have the same trap whenever they connect to the origin over HTTP while the origin forces HTTPS.

2. WordPress address settings that disagree with the server

If Settings → General lists the site as http://example.com but the server redirects to https://www.example.com, WordPress and the server keep correcting each other. When you can't reach the admin area, set both addresses in wp-config.php, above the line that says “That's all, stop editing”:

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

Use exactly the protocol and hostname your server redirects to.

3. WordPress or another app behind a proxy that hides HTTPS

Behind a load balancer, reverse proxy or container platform, the app often receives every request as HTTP, even when the visitor used HTTPS. An app that forces HTTPS will then redirect forever. The proxy usually passes the original scheme in an X-Forwarded-Proto header; tell the app to trust it. In WordPress, add this to wp-config.php:

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

Frameworks have equivalents: app.set('trust proxy', true) in Express, SECURE_PROXY_SSL_HEADER in Django and trusted proxies in Laravel.

4. A plugin that redirects

SSL plugins, redirect managers, multilingual plugins and security plugins all add redirects, and two of them can disagree. If you're locked out of WordPress, rename the wp-content/plugins folder over FTP or your host's file manager to disable every plugin at once. If the site loads, rename it back and re-enable plugins one at a time until the loop returns.

5. Conflicting www, HTTPS or trailing-slash rules

Your host's control panel, the CDN, .htaccess and the app can each enforce a version of the URL. If one says www and another says no www, or one adds a trailing slash that another removes, you get a loop. Pick one canonical form, enforce it in one place, and remove the others. On Apache, a single rule that handles both HTTPS and the hostname avoids both loops and chains:

RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^(.*)$ https://example.com/$1 [R=301,L]

On Nginx, put the redirect in its own server block for the variants, so it can never match the final hostname:

server {
    listen 80;
    listen 443 ssl;
    server_name www.example.com;
    # ssl_certificate and ssl_certificate_key lines go here
    return 301 https://example.com$request_uri;
}

6. A redirect rule that matches its own destination

A rule such as “redirect everything under /shop to /shop/new/” also matches /shop/new/, so it redirects there again. Anchor the pattern or exclude the target. The same mistake happens in Next.js middleware that redirects every request without checking whether it's already on the destination path:

import { NextResponse } from "next/server";

export function middleware(req) {
  const { pathname } = req.nextUrl;
  if (pathname.startsWith("/login")) return NextResponse.next(); // don't redirect the target
  if (!req.cookies.get("session")) return NextResponse.redirect(new URL("/login", req.url));
}

7. Login loops caused by cookies

If a page redirects to the login page, and the login page redirects back because it thinks you're signed in, the session cookie probably isn't being saved or read. Common reasons are a cookie set for the wrong domain (example.com versus www.example.com), a Secure cookie on an HTTP page, or a SameSite setting that blocks it after a cross-site sign-in. These loops usually affect logged-in areas only, which is why clearing cookies can fix them for an individual visitor.

After the fix: check every version of the URL

Test all four versions of the homepage and a few deep pages: http:// and https://, with and without www. Each should reach the final URL in one redirect, not a chain. The Redirect Checker's bulk mode handles this in one run. Then purge your CDN cache, because a cached redirect can keep the loop alive for visitors even after the server is fixed. Browsers also cache 301 redirects, so test in a private window.

Does a redirect loop hurt SEO?

Yes, for every URL caught in it. Googlebot follows up to 10 redirect hops; a loop never reaches content, so the page can't be crawled or indexed, and Search Console's Page indexing report lists it under Redirect error. Once fixed, use URL Inspection in Search Console to request a recrawl of important pages. Long chains that do eventually resolve aren't errors, but they slow down visitors and crawlers, so flatten them while you're fixing the loop. The difference between permanent and temporary redirects is covered in 301 vs 302 redirects.

Frequently asked questions

Why does the site work for other people but not for me?

Usually a cookie. If the loop depends on a login state, language preference or A/B test cookie, only visitors with that cookie see it. Clearing the site's cookies or trying a private window confirms it.

How many redirects is too many?

Chrome and Firefox give up after 20 redirects in a row, and Googlebot after 10. For performance, aim for zero redirects on internal links and at most one hop for anything external.

Can a browser extension cause ERR_TOO_MANY_REDIRECTS?

Yes. Extensions that force HTTPS, rewrite URLs or block cookies can create loops on some sites. If a private window, which disables most extensions, works, turn extensions off one at a time to find the culprit.

The Tech Scouts

Writer at TheTechScout.