Home / Fix guides / Technical SEO

How to fix ERR_TOO_MANY_REDIRECTS (redirect loop)

ERR_TOO_MANY_REDIRECTS means two or more rules on your site send visitors back and forth forever, usually because of a mismatch between http and https, www and non-www, or a plugin and a server setting that both redirect. Find which rule fires twice, remove or align one of them, and the loop stops.

An ERR_TOO_MANY_REDIRECTS error means your website keeps sending the visitor from one address to another, and the second address sends them straight back. The browser follows the chain for a while, then gives up and shows an error instead of your page.

What people see

The wording 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: "Safari can't open the page because too many redirects occurred".

Sometimes the whole site is affected. Sometimes only one page, only the login area, or only visitors who already have cookies from an earlier visit. That last case is why the owner may see the error while a colleague sees a normal site.

Why it matters

  • Visitors: they cannot reach the page at all, and most will not try again.
  • Search: search engine crawlers also give up on a loop, so the page cannot be crawled or indexed. If the loop is on your home page or the whole site, pages can drop out of search results over time.
  • Sales: a loop on a checkout, cart or login page quietly costs orders and support requests.
  • Trust: a browser error page looks broken, and customers often assume the business is closed.

How to check if your site has it

All of these are free.

  1. Open the page in a private or incognito window. If it works there but not in your normal window, clear the cookies for your site and try again. A stale cookie can cause a loop on its own.
  2. Test all four versions of your address: http://example.com, http://www.example.com, https://example.com and https://www.example.com. Note which ones fail.
  3. Run a command line check (on Mac or Linux, or on Windows using WSL or Git Bash, because the command uses grep):
curl -sIL --max-redirs 10 https://example.com | grep -iE "^(HTTP|location)"

If you see the same two location: addresses repeating, that is your loop. The lines show exactly which address sends visitors where.

  1. In Chrome, open Developer Tools (F12), go to the Network tab, tick "Preserve log" and reload. Each redirect shows as a 301, 302, 307 or 308 line with the destination.

Common causes

CauseTypical sign
Server forces HTTPS but a CDN or proxy talks to it over HTTPStarted after turning on Cloudflare or another proxy
WordPress address and Site address disagree (http vs https, www vs non-www)Started after a migration or SSL install
Two redirect sources at once (a plugin plus .htaccess or server config)Started after installing an SSL or redirect plugin
www and non-www rules pointing at each otherOnly some address versions fail
Bad redirect rule for one pageOnly that page loops
Cookies or login redirectsWorks in a private window

How to fix it in general

The goal is one canonical address (for example https://www.example.com) and exactly one place that redirects everything else to it.

  1. Work out which two addresses bounce between each other, using the checks above.
  2. List every place that can redirect: your CMS settings, redirect or SSL plugins, the web server config, your hosting control panel, and your CDN or proxy.
  3. Turn off all but one. Test after each change, because the loop often disappears after a single edit.
  4. Make sure the settings agree on http vs https and www vs non-www.
  5. Clear your site cache, CDN cache and browser cookies before testing again. Cached redirects can make a fixed loop look like it is still there.

Before editing config files, take a backup or copy the original lines. A typo in .htaccess or an Nginx file can take the whole site down.

Fixes on common platforms

WordPress. The most common cause is a mismatch between the two address settings, usually under Settings, General ("WordPress Address" and "Site Address"). Both should use the same scheme and host. If you cannot log in, check wp-config.php for WP_HOME and WP_SITEURL, which override those settings. Next, deactivate redirect, SSL and caching plugins by renaming their folders in wp-content/plugins over FTP or the file manager. See the WordPress redirect loop guide for the full walkthrough.

Cloudflare. If the SSL/TLS mode is set to Flexible while your server also redirects to HTTPS, the loop is almost guaranteed: Cloudflare asks your server over HTTP, your server says "go to HTTPS", and round it goes. Switching to Full or Full (strict) usually fixes it, provided your server has a valid certificate. See the Cloudflare redirect loop guide.

Apache. Look in .htaccess for RewriteRule lines that force HTTPS or www. Behind a proxy, the server may not see that the original request was already HTTPS, so the rule fires every time. Checking the X-Forwarded-Proto header in the condition is the usual remedy.

Nginx. Look for return 301 or rewrite lines in the server blocks. A common mistake is a redirect inside the HTTPS block that points back to HTTPS on the same host, or a location block that redirects to itself.

Behind a load balancer or proxy (any CMS). If the app only sees plain HTTP, it keeps trying to upgrade. In WordPress, this snippet in wp-config.php tells it the original request was secure:

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

Only use this if your proxy really sets that header. Other platforms such as Next.js, WooCommerce and cPanel have their own guides in the same section of this site.

If you are not comfortable editing server files, send your developer or host the output of the curl command above. It usually tells them exactly where to look.

How to confirm the fix worked

  • Run the curl command again. You should see one redirect at most, ending in a 200 response.
  • Test all four address versions. Each should end on your one preferred address.
  • Check in a private window and on your phone using mobile data, to rule out cached results.
  • Test the pages that matter most: home page, contact form, login and checkout.
  • Do not leave a chain behind. Three hops that technically work are still slower and weaker than one, so read about redirect chains if the curl output shows more than one step.

How to stop it coming back

  • Pick one preferred address and write it down, so everyone changing settings uses the same one.
  • Keep only one tool in charge of HTTPS and www redirects.
  • Re-test the four address versions after any migration, SSL renewal, CDN change, new plugin or hosting move.
  • Make changes to redirect rules one at a time, and note what you changed and when.
  • Check regularly. SiteMonday's week 6 service, the broken links and 404 sweep, looks for redirect problems like this one (see week 6), and the report lists what it found in a ranked fix list for you or your developer to act on.

Step by step for your platform

Questions

What does ERR_TOO_MANY_REDIRECTS mean?

It means the browser was sent from address to address so many times without reaching a page that it stopped trying. The cause is almost always two settings or rules that redirect to each other.

Can I fix it by clearing my cookies?

Sometimes. If the page loads in a private window but not in your normal one, clearing cookies for that site can solve it. If it fails everywhere, the problem is in your site or server settings.

Does a redirect loop hurt my Google rankings?

Yes, if it lasts. Search engines cannot crawl or index a page that loops, so it can drop out of results until the loop is fixed.

Why did it start right after I installed an SSL certificate or Cloudflare?

The new setup often adds a second HTTPS redirect, or tells your server the visitor is on HTTP when they are not. Check that only one place forces HTTPS and that your CDN's SSL mode matches your server.

Is a redirect loop the same as a redirect chain?

No. A chain ends on a working page after several steps, while a loop never ends. Both should be cleaned up, but loops break the page completely.

Should I fix it myself or ask a developer?

You can safely check settings, test with curl and turn off plugins yourself. If the cause is in server files like `.htaccess` or Nginx config, ask your developer or host, and give them the curl output.

Related problems