How to Fix a Redirect Loop (ERR_TOO_MANY_REDIRECTS)
You open your site and Chrome shows a blank page with one line: ERR_TOO_MANY_REDIRECTS. Nothing loads. Your visitors see the same thing, and so does Google’s crawler. A redirect loop is one of the most annoying errors on the web, because the page isn’t broken. Two rules are arguing with each other, and neither one backs down.
This guide shows you how to fix a redirect loop step by step. You’ll learn what causes it, how to find the exact rule responsible and how to repair it on WordPress, Apache, Nginx and Cloudflare. You’ll also get a checklist and a few habits that stop the error from coming back.
What ERR_TOO_MANY_REDIRECTS actually means
A redirect loop happens when page A sends the browser to page B and page B sends it straight back to A. Sometimes the circle is longer, like A to B to C and back to A. The browser follows the trail for a while, then gives up.
Most browsers stop after about 20 hops. Chrome shows ERR_TOO_MANY_REDIRECTS. Firefox says the page isn’t redirecting properly. Safari tells you it can’t open the page because too many redirects occurred. Different words, same problem.
Here’s the part that confuses people. Nothing is broken in the usual sense. Your server answers every request. It just answers with the wrong instruction every time. Honestly, that’s good news, because the fix is almost always one bad rule and not a crashed site.
Start with the quick fix: cookies and cache
Before you touch the server, rule out your own browser. A stale cookie can send a login system in circles, and that happens a lot right after a site changes its HTTPS or domain settings.
- Open the URL in a private window. If it loads, the problem sits in your browser.
- Clear cookies and cached files for that one site, then reload.
- Try a second browser, or your phone on mobile data.
If the error survives all three, the loop lives on the server side. If you run the site, keep reading. If you’re a visitor, tell the site owner and check back later.
Find the loop before you fix it
Guessing wastes hours. Trace the loop first. Paste the failing URL into our redirect checker and read the hops. A loop shows up as the same URL appearing again and again, with each response pointing to the next one.
Look at the pattern. If two URLs trade places, like the HTTP and HTTPS versions of one page, two rules disagree. If a longer cycle appears, check the status code on each hop. Our guide on debugging redirect chains shows how to read the output, and our 301 vs 302 redirects guide explains what each code means.
You can also open your browser’s Network tab, tick Preserve log and reload the page. Every redirect appears as its own row with a Location header. Check the response headers too. A header that names Cloudflare tells you a CDN sits in front of your server, and that matters in a minute.
The usual suspects
Most loops come from one of five places:
- HTTP and HTTPS rules that fight each other.
- A www rule on one layer and a non www rule on another.
- A CDN or proxy that talks to your server over the wrong protocol.
- A CMS whose saved site address disagrees with your server rules.
- A plugin or an old config rule that matches its own target.
Work through them in that order. The first three cause most cases.
Fix 1: HTTP and HTTPS fighting
Say your server sends every HTTP request to HTTPS. Now say your CMS holds an HTTP address and sends every HTTPS request back to HTTP. Each side does what it was told. Neither one stops.
The fix is to make every layer agree. Set your site address to the HTTPS version in your CMS, in your server config and in any plugin that touches redirects. Keep exactly one rule in charge of the jump from HTTP to HTTPS.
Fix 2: www and non www disagreeing
This one looks the same as the HTTPS case. Your host sends non www to www. A plugin or CDN rule sends www to non www. Round and round it goes.
Pick one version as your main address, then delete the rule that points the other way. Update your canonical tags and your sitemap to match. Our sitemap generator rebuilds a clean list of final URLs in a minute.
Fix 3: Cloudflare and other CDNs
If you use Cloudflare, check the SSL mode first. In Flexible mode, Cloudflare connects to your server over plain HTTP, even when the visitor used HTTPS. If your server forces HTTPS, it answers that HTTP request with a redirect. Cloudflare asks again over HTTP and gets the same answer. That’s a loop.
Switch the mode to Full or Full (strict) and install a valid certificate on your server. Then purge the CDN cache, because the CDN can keep serving the old redirect.
Other proxies and load balancers cause the same trouble. If a proxy handles HTTPS and passes plain HTTP to your server, the server has to read the forwarded protocol header. Otherwise it thinks every visit is insecure and redirects forever.
Fix 4: WordPress and CMS settings
WordPress stores two addresses, the WordPress Address and the Site Address. When they differ, or when one still starts with HTTP, loops follow. Open Settings, then General, and make both use the same HTTPS address.
Locked out of the dashboard? Set the addresses in the WordPress config file instead:
define('WP_HOME', 'https://example.com');
define('WP_SITEURL', 'https://example.com');Still looping? Switch off your plugins. Rename the plugins folder inside your content folder through FTP or your host’s file manager, then reload. If the site loads, rename the folder back and turn plugins on one at a time. Redirect plugins and force HTTPS plugins are the usual culprits. Then save your Permalinks page once to rebuild the rewrite rules.
Fix 5: Apache and Nginx rules
A rule that matches its own destination is the classic server side loop. Here’s an Apache example:
RewriteEngine On
RewriteRule ^(.*)$ https://example.com/$1 [R=301,L]That rule has no condition. It fires on the HTTPS page too, so every request redirects to itself. Add a condition so it only fires on HTTP:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://example.com/$1 [R=301,L]Behind a proxy, the HTTPS check can read off all the time, so test the forwarded protocol header instead. In Nginx, keep the redirect inside the server block that listens on port 80:
server {
listen 80;
server_name example.com;
return 301 https://example.com$request_uri;
}If the same return line sits in the block that handles port 443, you’ve found your loop.
Pattern rules need care too. Test any expression against sample URLs in our regex tester before you ship it, and compare your old and new config files with our text diff checker. Encoded characters can trip a rule as well, so run the odd ones through our URL encoder decoder.
Login loops and cookie trouble
Some loops only hit logged in pages. The app sends you to the login page, the login sets a cookie and the app sends you back. If the browser never saves that cookie, the cycle repeats.
Two things cause this most often. A cookie marked Secure won’t save on an HTTP page. And a cookie set for the wrong domain won’t come back on the next request. Check the cookie domain, the Secure flag and your site address settings together.
A checklist to fix the loop
Work through these steps in order:
- Open a private window and clear cookies for the site.
- Run the URL through a redirect checker and note which URLs repeat.
- Check that your CMS and server both use the same HTTPS address.
- Check your CDN’s SSL mode, and use Full or Full (strict).
- Switch off plugins, then turn them back on one at a time.
- Review your server rules for any rule that matches its own target.
- Test all four versions of your home page: HTTP and HTTPS, with and without www.
- Request a fresh crawl in Google Search Console.
How to stop it coming back
Redirect loops usually appear right after a change. You moved hosts, turned on HTTPS, added a plugin or touched a CDN setting. So build a few habits:
- Keep one source of truth for redirects. Don’t split them across the CMS, the server and the CDN.
- After any change, test every version of your home page.
- Save a copy of your config file before you edit it.
- Purge your CDN cache after you change redirect settings.
- Keep your robots.txt open to the old URLs so crawlers can see the redirect. Our robots.txt generator builds a clean file.
Google treats a loop as a failed page, so speed matters. Fix it, then use the URL Inspection tool in Search Console to ask for a new crawl.
The short version
ERR_TOO_MANY_REDIRECTS means two or more rules send visitors in a circle. Clear your cookies first, then trace the loop with a redirect checker. Check your HTTPS settings, your www rules, your CDN’s SSL mode, your CMS addresses and your server config, in that order. Most loops end when you change or remove one rule.
Run your own home page through the redirect checker today. If it shows one hop or none, you’re set.