How to Fix ERR_TOO_MANY_REDIRECTS (Step-by-Step for Every Cause)
Fix the ERR_TOO_MANY_REDIRECTS error fast. Step-by-step solutions for SSL loops, CMS settings, CDN config, .htaccess rules, and plugin conflicts.
Last updated: 2026-02-17
What ERR_TOO_MANY_REDIRECTS Means
When your browser shows ERR_TOO_MANY_REDIRECTS (Chrome) or "The page isn't redirecting properly" (Firefox), it means your site is caught in a redirect loop. The browser requests a URL, gets redirected to another URL, which redirects back to the first URL (or through a chain that eventually loops), and after about 20 cycles the browser gives up.
This is not a vague error. It has a specific, fixable cause every time. The challenge is identifying which redirect rule is creating the loop.
Quick Diagnostic Steps
Before diving into specific causes, run through these checks to narrow down the problem:
Clear Your Browser Cookies and Cache
Test in an Incognito Window
Check the Redirect Chain
curl -I -L https://yourdomain.com in a terminal to see the full redirect chain. This shows exactly which URLs are involved in the loop.Identify When It Started
Cause 1: SSL/HTTPS Redirect Loops
This is the most common cause. It happens when your server redirects HTTP to HTTPS, but something in your stack is terminating SSL and sending the request back as HTTP internally. The server sees HTTP, redirects to HTTPS, the SSL termination converts it back to HTTP, and the loop begins.
When This Happens
- You just enabled "Force HTTPS" in your CMS or CDN
- You are using a reverse proxy or load balancer that terminates SSL
- You have both server-level and application-level HTTPS redirects active
- Your CDN is set to "Flexible SSL" while your origin server also forces HTTPS
How to Fix It
If using Cloudflare:
Cloudflare's "Flexible SSL" mode connects to your origin over HTTP even when the visitor uses HTTPS. If your origin also redirects HTTP to HTTPS, you get a loop.
- Log into Cloudflare dashboard
- Go to SSL/TLS settings
- Change the mode from "Flexible" to "Full" or "Full (Strict)"
- Wait 5 minutes for the change to propagate
If using a load balancer or reverse proxy:
Your application needs to check the X-Forwarded-Proto header instead of the direct connection protocol. The load balancer terminates SSL and forwards the request over HTTP, but includes X-Forwarded-Proto: https to indicate the original protocol.
For Nginx behind a load balancer, check that your redirect rule uses:
if ($http_x_forwarded_proto = "http") {
return 301 https://$host$request_uri;
}
Instead of:
if ($scheme = "http") {
return 301 https://$host$request_uri;
}
If using WordPress:
- Check
wp-config.phpfor hardcodedWP_HOMEandWP_SITEURLvalues - Ensure both use
https://if you are forcing HTTPS - If behind a proxy, add this to
wp-config.phpbefore the "That's all" line:
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
$_SERVER['HTTPS'] = 'on';
}
The "Flexible SSL" setting in Cloudflare is the single most common cause of redirect loops for sites that also have server-side HTTPS enforcement. Always use "Full" or "Full (Strict)" if your origin server has a valid SSL certificate.
Cause 2: CMS Configuration Conflicts
Content management systems like WordPress, Drupal, and Joomla have their own URL and redirect settings. When these conflict with server-level rules, loops happen.
WordPress Specific
Site URL mismatch:
If Settings > General > WordPress Address (URL) and Site Address (URL) do not match your actual configuration, WordPress can create redirect loops.
- If you cannot access the admin panel, edit
wp-config.phpdirectly:
define('WP_HOME', 'https://yourdomain.com');
define('WP_SITEURL', 'https://yourdomain.com');
- Check the database:
wp_optionstable, rowssiteurlandhome. These must match the actual URL visitors use.
Permalink flush:
Sometimes WordPress permalink rules become corrupted. If you can access the admin panel:
- Go to
Settings > Permalinks - Click "Save Changes" without changing anything
- This regenerates the
.htaccessrewrite rules
Catch redirect loops before your visitors do
Site Watcher monitors your site's redirect behavior continuously and alerts you when loops or chains appear.
Cause 3: CDN Configuration Issues
CDNs sit between your visitors and your origin server. Misconfigured CDN settings are a frequent source of redirect loops, especially around SSL and caching.
Common CDN Problems
Caching a redirect response:
If your CDN caches a 301 or 302 response, it will serve that redirect to all visitors even after you fix the origin. Purge the CDN cache after making any redirect-related changes.
Mixed CDN and origin redirects:
If both your CDN and your origin server redirect www to non-www (or vice versa), you can get a loop when they disagree. Choose one location to handle the canonical redirect and disable it everywhere else.
CDN page rules conflicting with origin:
CDN-level redirect rules (like Cloudflare Page Rules) can conflict with your server configuration. Audit all CDN redirect rules and compare them with your server configuration.
How to Fix
- List all redirect rules in your CDN configuration
- List all redirect rules on your origin server
- Look for conflicts: same URL being redirected to different destinations, or circular redirects between layers
- Consolidate redirects to one layer (preferably the CDN for performance)
- Purge CDN cache after making changes
Cause 4: .htaccess Rule Conflicts (Apache)
Apache servers use .htaccess files for URL rewriting and redirects. Multiple .htaccess files, plugin-generated rules, and hand-written rules can easily conflict.
Common .htaccess Problems
Multiple HTTPS redirect rules:
If two different rules both try to redirect to HTTPS, they can interact in unexpected ways.
Conflicting www/non-www rules:
Having both a "redirect to www" and "redirect to non-www" rule in different locations creates an instant loop.
Plugin-generated rules:
WordPress plugins, especially SEO and security plugins, often add their own .htaccess rules. These can conflict with each other or with manually added rules.
How to Fix
- Back up your current
.htaccessfile - Replace it with the minimal default for your CMS
- If the error stops, the problem is in your custom rules
- Add rules back one at a time until the error returns
- The last rule you added is the culprit
For WordPress, the minimal .htaccess is:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Cause 5: Plugin or Extension Conflicts
CMS plugins are the wild card. Security plugins, caching plugins, SEO plugins, and redirect plugins can all create redirect rules that conflict with each other.
How to Identify the Culprit
Disable All Plugins
plugins directory via FTP/SSH to plugins_disabled. This deactivates all plugins at once.Test the Site
Reactivate One at a Time
Check Plugin Settings
Common Offenders
- Security plugins that force HTTPS (conflicting with server-level HTTPS redirect)
- Caching plugins that serve cached redirect responses
- SEO plugins that enforce canonical URLs with redirect rules
- SSL plugins that add their own HTTPS redirect logic
- Redirect manager plugins with misconfigured rules
Cause 6: Server-Level Redirect Conflicts
When you have redirects configured at multiple levels (DNS, CDN, web server, application), they can conflict.
| Layer | Where Redirects Live | Example |
|---|---|---|
| DNS | DNS provider redirect records | Domain forwarding at registrar |
| CDN | Page rules, edge redirects | Cloudflare Page Rules |
| Web Server | .htaccess, nginx.conf, web.config | Apache RewriteRule |
| Application | CMS settings, app code | WordPress Site URL setting |
| Plugin/Extension | Plugin configuration | Yoast canonical redirect |
The fix is always the same: audit every layer, identify where redirect rules conflict, and consolidate them to a single layer.
Cause 7: Cookie or Session-Based Loops
Some redirect loops are caused by cookies. The application checks for a cookie, redirects to set it, checks again, and repeats because the cookie is not being set correctly.
Common Scenarios
- Cookie domain mismatch (
www.example.comcookie not readable onexample.com) - Secure cookie flag set but site accessed over HTTP
- Cookie path restriction preventing the redirect target from reading the cookie
- Browser blocking third-party cookies that the application depends on
How to Fix
- Clear cookies for the domain
- Check your application's cookie configuration (domain, path, secure flag, SameSite attribute)
- Ensure the cookie domain covers all subdomains if your redirect crosses subdomain boundaries
How Monitoring Catches Redirect Loops
Redirect loops are especially damaging because they affect every visitor immediately. Unlike a slow performance degradation that builds over time, a redirect loop is a complete outage for affected URLs.
Redirect Chain Monitoring
SSL Configuration Checks
Change Detection
Multi-Location Verification
Prevention Checklist
After fixing a redirect loop, take these steps to prevent it from happening again:
- Document all redirect rules across every layer (DNS, CDN, server, application, plugins)
- Consolidate redirects to as few layers as possible
- Test redirect changes in staging before applying to production
- Monitor redirect behavior continuously with automated tools
- Use "Full" or "Full (Strict)" SSL when using a CDN with an SSL-enabled origin
- Review plugin changes before activating any plugin that handles URLs, SSL, or redirects
- Keep a rollback plan for any redirect-related change
Every redirect loop has a specific, identifiable cause. The error is not random and it is not mysterious. Trace the redirect chain, find where it circles back, and fix the rule that creates the loop.
Stop Redirect Loops Before They Reach Your Users
Site Watcher monitors redirect chains, SSL configuration, and site availability continuously. Catch loops the moment they form. $39/mo unlimited, free for 3 targets.