Too Many Redirects error: What it means and how to fix


Updated on Aug 26, 2025
· 15 mins read
troubleshooting http redirects web development error fixing

Ever been stuck staring at that annoying Too Many Redirects error? You know, the one that shows up as ERR_TOO_MANY_REDIRECTS or “This page has a redirect loop”? Yeah, we’ve all been there. It’s like being trapped in a digital maze where every door just leads to another door. Let me walk you through what’s actually happening and how to break free from this redirect prison.

What’s Really Going On Behind the Scenes?

Picture this: you’re trying to visit a website, but instead of getting there, you’re being bounced around like a ping-pong ball. Here’s the play-by-play of what’s happening under the hood:

Your browser asks for /blog, the server says “nah, go to /blog/new”, so your browser dutifully follows. But then /blog/new says “actually, go back to /blog”. And round and round we go! It’s like asking for directions and being told “go that way” by two people pointing at each other.

The good news? Your browser isn’t stupid. After about 20 of these back-and-forth trips, it throws in the towel and shows you that error message. It’s basically saying “I’m not playing this game anymore” – which is honestly pretty smart of it.

too many redirect sequence diagram

Summary

  1. What is the Too Many Redirects Error?
    This error occurs when a web page is caught in an endless redirection loop between different URLs with no final destination.

    • Different Browser Messages: Chrome shows ERR_TOO_MANY_REDIRECTS, Firefox displays “The page isn’t redirecting properly”, Safari shows Too many redirects occurred.
    • Root Cause: Your browser detects a circular redirection pattern and stops the process to prevent an infinite loop.
  2. Common Causes:

    • For Website Visitors: Corrupted cookies, browser extensions interfering with site redirects, or outdated cached data.
    • For Website Owners: Misconfigured redirect rules, conflicting plugins (especially in WordPress), incorrect SSL/HTTPS configuration, or load balancer/CDN issues.
  3. How to Fix It?

    • For Website Visitors:

      • Clear browser cookies and cache: Instructions for all browsers.
      • Try incognito/private browsing mode.
      • Temporarily disable browser extensions.
      • Try a different browser or device.
      • Check your system’s time and date settings.
    • For Website Owners:

      • Check and fix redirect rules in server configuration files (.htaccess, nginx.conf).
      • Resolve plugin conflicts by deactivating plugins one by one.
      • Verify SSL/HTTPS configuration and certificate installation.
      • Check CMS URL settings (WordPress site URL settings, etc.).
      • Review load balancer and CDN configurations.
      • Implement logging to diagnose complex redirect patterns.
      • Detailed solutions for Apache, Nginx, and WordPress.
too many redirects flowchart

What Exactly Is This “Too Many Redirects” Thing?

So here’s the deal – when you see this error, your webpage is basically stuck in an endless game of “go fish” with different URLs. Instead of just showing you the content you wanted, it keeps getting passed around like a hot potato with no one willing to actually serve it up.

Each browser has its own way of telling you about this mess:

  • Chrome gets straight to the point: ERR_TOO_MANY_REDIRECTS
  • Firefox tries to be polite: “The page isn’t redirecting properly”
  • Safari gives you the full story: “Too many redirects occurred trying to open [URL]”
  • Edge just throws up its hands: “This page isn’t working right now”

But here’s the thing – no matter how your browser phrases it, they’re all basically saying the same thing: “I tried to follow the breadcrumbs, but they just led me in circles, so I’m giving up.” Smart browsers, really.

Why Does This Happen? The Usual Suspects

1. Wonky Redirect Rules

This is the big one – someone (maybe you, maybe your developer, maybe that intern from last summer) messed up the redirect rules. It’s like setting up a GPS that tells you to turn left to get to Main Street, but Main Street’s sign says “to get here, turn right.” Classic examples:

  • URL A points to URL B, but URL B points right back to URL A (it’s like two people saying “after you” forever)
  • Trying to force HTTPS but the SSL setup is broken, so HTTPS keeps bouncing back to HTTP
  • Creating a redirect chain that’s longer than a CVS receipt and eventually eats its own tail

Think of it like this: redirect rules are basically digital traffic signs. When they contradict each other, you get digital traffic jams.

2. Plugin Wars (The WordPress Special)

Oh boy, if you’re running WordPress, this one’s probably familiar. It’s like having too many cooks in the kitchen, except the cooks are plugins and the kitchen is your website’s URL structure:

  • Two SEO plugins both trying to be the “canonical URL boss”
  • Your caching plugin having a fight with your security plugin
  • Multiple redirect plugins stepping on each other’s toes like they’re dancing at a middle school dance

The worst part? These plugins usually work fine individually, but together they create more drama than a reality TV show.

3. SSL Certificate Drama

SSL certificates are supposed to make your site secure, but when they’re misconfigured, they can turn your website into a redirect pinball machine:

  • Your site demands HTTPS, but the SSL certificate is installed wrong (or not at all)
  • Mixed content issues where some stuff is HTTP and some is HTTPS, confusing everyone
  • Your CDN or load balancer has different SSL ideas than your server

Even free SSL providers like Let's Encrypt can cause headaches if you don’t set them up properly. Free doesn’t always mean easy!

Sometimes it’s the cookies causing all the trouble (and not the good kind you eat):

  • Login cookies that got corrupted and now don’t know who you are
  • Session cookies that are having an identity crisis
  • Location or language cookies that keep trying to send you “home” but can’t figure out where home is

It’s like having a bouncer who keeps checking your ID but can’t read it properly, so they keep asking you to go get a new one.

Playing Detective: How to Figure Out What’s Wrong

Before you start randomly changing things (we’ve all been there), let’s do some proper detective work:

1. Browser Developer Tools Are Your Friend

Hit F12 or right-click and “Inspect” to open your browser’s dev tools. Head to the Network tab and try loading that problematic page. You’ll see a bunch of 301 or 302 status codes doing the redirect dance. It’s like watching a tennis match, but with HTTP requests.

This is where you can actually see the redirect loop happening in real-time. Pretty cool, right?

301 error logs

2. Server Logs Tell the Real Story

Your server logs are like a diary of everything that’s happening. Dig into those access and error logs to see the redirect pattern. It’s like reading the server’s thoughts: “User asked for X, I sent them to Y, then Y sent them back to X, then…”

3. Test Everywhere (Because Browsers Are Weird)

Try the same URL in Chrome, Firefox, Safari, your phone, your tablet, maybe even that old laptop in your closet. Sometimes the issue is browser-specific, and sometimes it’s universal. It’s like checking if the problem is with your TV or if the cable is actually out.

4. Online Tools to the Rescue

Tools like httpstatus.io or HTTP Status Checker are like having a redirect GPS – they’ll show you exactly where your URLs are going and where they’re getting stuck.

devtoollab http status checker

Alright, Let’s Fix This Thing

If You’re Just Trying to Visit a Website

Hey, sometimes you’re just an innocent bystander caught in someone else’s redirect mess. Here’s what you can do:

1. The Classic “Turn It Off and On Again” (Browser Edition)

Clear your cookies and cache – it’s like giving your browser a fresh start. Corrupted cookies are often the culprit here:

  • Chrome: Settings → Privacy and security → Clear browsing data (it’s like spring cleaning for your browser)
Clear Browser Cache and Cookies

For the other browsers in your life:

  • Firefox: Options → Privacy & Security → Cookies and Site Data → Clear Data
  • Safari: Preferences → Privacy → Manage Website Data → Remove All
  • Edge: Settings → Privacy, search, and services → Clear browsing data

Think of this as telling your browser to forget everything it thinks it knows about that website and start fresh.

2. Go Incognito (The Browser Kind)

Pop open an incognito or private window and try the site there. It’s like wearing a disguise – your browser won’t use any of its stored data, so if the site works here, you know the problem is with your regular browser profile.

Url Check ScreenShot

3. Disable Those Browser Extensions

Your ad blocker, VPN, or that random extension you installed six months ago might be messing with the redirects. Turn them off temporarily – especially the security and ad-blocking ones. They mean well, but sometimes they’re a bit too helpful.

browser extensions

4. Try a Different Browser

If Chrome’s giving you grief, try Firefox. If Firefox is being stubborn, give Safari a shot. Sometimes browsers just don’t get along with certain websites – it’s like personality conflicts, but for software.

5. Check Your Clock (Seriously)

Make sure your computer’s date and time are correct. I know it sounds weird, but some authentication systems are picky about this stuff. It’s like showing up to a party on the wrong day – technically you’re invited, but the timing’s all wrong.

If It’s Your Website That’s Acting Up

Okay, so it’s your site causing the trouble. Don’t panic – we’ve all been there. Here’s how to fix it:

1. Hunt Down Those Redirect Rules

This is usually where the problem lives. Your redirect rules are like traffic directions, and right now they’re telling people to go in circles:

Apache (.htaccess) users: Look for conflicting Redirect, RedirectMatch, or RewriteRule lines. The classic mistake looks like this:

RewriteRule ^support$ /help [R=301,L]
RewriteRule ^help$ /support [R=301,L]

See the problem? It’s like two signs pointing at each other saying “the bathroom is that way.”

Nginx folks: Check your location blocks for return or rewrite directives that might be fighting each other. Here’s how to do HTTPS redirects without creating a mess:

# This won't cause loops
server {
    listen 80;
    server_name example.com;

    location / {
        if ($http_x_forwarded_proto != "https") {
            return 301 https://$host$request_uri;
        }
    }
}

IIS users: Your web.config file might have URL Rewrite rules that are contradicting each other. Use the IIS URL Rewrite trace tool – it’s like having X-ray vision for your redirects.

The key here is to think like a user following breadcrumbs. If the breadcrumbs lead you in a circle, you’ve found your problem.

2. Plugin Conflict Resolution (The WordPress Drama)

If you’re running WordPress, this is probably where your headache is coming from. Plugins can be like roommates – they’re great individually, but sometimes they just don’t play nice together:

The systematic approach (aka “the process of elimination”):

  1. Back up your site first (seriously, do this)
  2. Turn off ALL plugins (I know, scary)
  3. Check if the redirect loop is gone
  4. Turn plugins back on one by one, testing after each one
  5. When the error comes back, you’ve found your troublemaker

The usual suspects that cause drama:

  • Multiple SEO plugins trying to be the boss (Yoast, Rank Math, All-in-One SEO)
  • Caching plugins having fights with security plugins (WP Rocket vs. Wordfence, anyone?)
  • Redirect plugins stepping on multilingual plugins’ toes
  • CDN plugins and SSL plugins not agreeing on who’s in charge

Settings that commonly cause trouble:

  • Multiple plugins trying to force HTTPS (it’s like having three people all trying to be the designated driver)
  • Canonical URL settings that contradict each other
  • www vs. non-www redirect wars
  • Location-based redirects that can’t make up their mind

The trick is patience. I know it’s tempting to just randomly change settings, but methodical testing will save you hours of frustration.

3. SSL/HTTPS Configuration Nightmares

SSL certificates are supposed to make your site secure, but when they’re messed up, they turn your website into a redirect pinball machine:

Make sure your SSL certificate isn’t lying to you:

  • Check if it’s actually installed correctly (not just “looks installed”)
  • Use SSL Labs to test it – it’s like a health checkup for your certificate
  • Make sure the certificate matches your domain name (seems obvious, but you’d be surprised)
  • Check that all the intermediate certificates are there (they’re like the supporting cast)

Mixed content is the devil: Your site might be trying to load HTTP stuff on HTTPS pages, which confuses everyone. Hunt down those hardcoded HTTP links:

grep -r "http://" --include="*.php" --include="*.html" /path/to/your/website

This command is like a metal detector for HTTP links hiding in your HTTPS site.

Load balancer drama: If you’re using a load balancer or CDN, make sure it’s not having an identity crisis about whether it’s HTTP or HTTPS:

curl -I https://pinggy.io -H "X-Forwarded-Proto: https"

This tells you what your load balancer is actually thinking, which might be different from what you think it’s thinking.

4. CMS Settings That Might Be Lying

Your CMS might have some confused settings that are causing all this chaos:

WordPress users, check these: Make sure your “WordPress Address” and “Site Address” in Settings → General are exactly the same. If one says https://example.com and the other says https://www.example.com, you’ve found your problem.

You can also hardcode these in wp-config.php to stop WordPress from getting confused:

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

It’s like giving WordPress a sticky note with your address so it stops asking for directions.

Drupal folks: Check your settings.php file for base URL confusion and make sure your trusted host patterns include all the ways people might access your site:

$settings['trusted_host_patterns'] = [
  '^example\.com$',
  '^www\.example\.com$',
];

Joomla users: Your SEO settings in Global Configuration might be the culprit, or maybe your redirect plugin is being overly helpful. Sometimes Joomla’s auto-generated .htaccess rules get a bit enthusiastic too.

5. CDN and Load Balancer Shenanigans

Modern hosting setups with CDNs and load balancers can create some really creative redirect loops:

Cloudflare users: Check your Page Rules – they might be fighting with your server’s redirect rules. Also, make sure your SSL/TLS mode makes sense (Flexible, Full, or Full Strict). The “Always Use HTTPS” setting can sometimes get into arguments with your server’s own HTTPS redirects.

AWS folks: Your Application Load Balancer might have listener rules that contradict each other. Check that the X-Forwarded-Proto header is being passed along correctly:

aws elbv2 describe-rules --listener-arn your-listener-arn

Custom proxy setups: Make sure your proxy layers aren’t playing telephone with the redirects. Each layer should know what protocol it’s actually using:

proxy_set_header X-Forwarded-Proto $scheme;

The key here is that every layer in your stack needs to agree on what’s happening. It’s like making sure everyone in a relay race is running in the same direction.

6. When All Else Fails: Logging and Monitoring

Sometimes you need to put on your detective hat and gather evidence:

Set up some logging: Configure your server to log redirect chains so you can see exactly what’s happening:

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

Add some debug code: If you’re comfortable with code, add some temporary logging to see what’s triggering the redirects:

error_log("Redirect from " . $_SERVER['REQUEST_URI'] . " to " . $redirectUrl);

Think of this like setting up security cameras to catch the redirect loop in action. Once you can see the pattern, fixing it becomes much easier.

The key to all of this is being methodical. Test one thing at a time, keep backups, and don’t be afraid to ask for help if you get stuck. We’ve all been there!

When You Need to Get Really Nerdy About It

cURL: Your Command Line Detective

Want to see exactly what’s happening? Fire up your terminal and use cURL:

curl -IL https://pinggy.io
curl terminal

This shows you every single redirect hop with all the gory details. It’s like having X-ray vision for HTTP requests.

Network Monitoring Tools for the Hardcore

If you’re really into the technical weeds, tools like Wireshark or Fiddler can show you every packet flying around. It’s overkill for most situations, but sometimes you need that level of detail.

Add Some Debug Code

Drop some temporary logging into your code to see what’s making those redirect decisions:

error_log('Redirect from: ' . $_SERVER['REQUEST_URI'] . ' to: ' . $destination);

It’s like putting a GPS tracker on your redirects to see where they’re going and why.

How to Avoid This Mess in the Future

Some Redirect Wisdom

Here’s how to keep your redirects from going rogue:

Test before you deploy – Use a staging site to test your redirect rules. It’s like trying on clothes before buying them.

Set redirect limits – Configure your app to stop after a reasonable number of redirects (like 5-10). It’s like having a circuit breaker for your redirects.

Document everything – Keep notes about what redirects you’ve set up and why. Future you will thank present you.

Monitor your stuff – Set up alerts if redirect chains get too long. It’s like having a smoke detector for your website.

Regular checkups – Periodically review your redirect rules and clean up the ones you don’t need anymore. It’s like decluttering your digital closet.

WordPress

Enable debug mode to see what’s happening:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);

And double-check those URL settings in Settings → General – they need to match exactly.

Apache Servers

Here’s a safe way to redirect HTTP to HTTPS without creating loops:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Nginx Servers

For Nginx, this won’t cause redirect loops:

server {
    listen 80;
    server_name example.com www.example.com;

    if ($http_x_forwarded_proto != "https") {
        return 301 https://$host$request_uri;
    }
}

These examples check if you’re already on HTTPS before redirecting, which prevents the dreaded loop.

Wrapping This Up

Look, the “Too Many Redirects” error is annoying, but it’s not the end of the world. Think of it as your browser being a good friend who stops you from walking in circles when you’re lost.

Most of the time, it’s either corrupted cookies (if you’re just browsing) or messed up redirect rules (if it’s your site). Work through the solutions methodically – don’t just randomly change things and hope for the best.

And hey, if you’ve tried everything in this guide and you’re still stuck, that’s what support teams and web developers are for. Sometimes you need a fresh pair of eyes to spot what you’ve been staring at for hours.

The key is not to panic. Every redirect loop has a cause, and every cause has a solution. You’ve got this!