How to Fix ERR_TOO_MANY_REDIRECTS
Step-by-step troubleshooting for ERR_TOO_MANY_REDIRECTS: clear cookies, check HTTPS settings, review .htaccess rules, inspect Cloudflare SSL mode, and fix WordPress redirect loops.
ERR_TOO_MANY_REDIRECTS means the browser detected a redirect loop — the server keeps sending the browser back and forth between URLs without ever serving a page. Chrome gives up after 20 redirects. Other browsers have similar limits.
The error message varies by browser:
- Chrome: "This page isn't working. example.com redirected you too many times."
- Firefox: "The page isn't redirecting properly"
- Safari: "Safari can't open the page because too many redirects occurred"
- Edge: Same as Chrome (Chromium-based)
Here is how to fix it, starting with the quickest client-side checks and moving to server-side root causes.
Step 1: Clear Cookies for the Site
Cookies are the most common client-side cause. A redirect rule may depend on a cookie value, and a stale or corrupted cookie creates a loop.
Clear site-specific cookies in Chrome
Click the padlock icon (or tune icon) in the address bar, then Cookies and site data > Manage on-device site data. Find the affected domain and delete its cookies. Alternatively, go to chrome://settings/cookies/detail?site=example.com.
Test in incognito/private mode
Press Ctrl+Shift+N (Chrome) or Ctrl+Shift+P (Firefox) to open a private window. Navigate to the URL. If it works in incognito but not in your normal browser, cookies are the problem.
Don't clear all cookies
Only clear cookies for the specific domain. Clearing all cookies logs you out of everything and is overkill for this diagnosis.
If the error persists in incognito mode, the problem is server-side. Move to the next steps.
Step 2: Check HTTPS Redirect Configuration
The most common server-side cause is a conflict between HTTP-to-HTTPS redirects and HTTPS-to-HTTP redirects. This creates a loop:
http://example.com → (server forces HTTPS) → https://example.com
https://example.com → (something forces HTTP) → http://example.com
→ repeat forever
Common causes:
- Mixed SSL settings: Your server or CDN terminates SSL but forwards requests as HTTP internally. The app sees HTTP and redirects to HTTPS, which comes back as HTTP again.
- Cloudflare SSL mode set to "Flexible": Cloudflare connects to your origin over HTTP while serving users over HTTPS. If your origin also forces HTTPS, you get a loop.
- WordPress
siteurlandhomemismatch: One is set tohttp://while HTTPS is forced elsewhere.
The Fix
# Check what your server actually returns (bypass CDN if possible)
curl -sI "http://example.com" | grep -iE "^(HTTP/|location:)"
curl -sI "https://example.com" | grep -iE "^(HTTP/|location:)"
Both commands should show a clear, one-direction redirect chain. If HTTP redirects to HTTPS and HTTPS also redirects — you have your loop.
Step 3: Review .htaccess Rules (Apache)
On Apache servers, .htaccess is the usual suspect. Conflicting or overlapping redirect rules create loops.
# COMMON LOOP: These two rules fight each other
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
# ... elsewhere in the file or in another .htaccess:
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1 [R=301,L]
Check for duplicate HTTPS rules
Search your .htaccess for all RewriteRule lines. Look for conflicting HTTP/HTTPS redirects.
Check for www/non-www conflicts
A rule that forces www combined with a rule that forces non-www creates a loop. Pick one and remove the other.
Temporarily disable .htaccess
Rename .htaccess to .htaccess.bak and reload the page. If the error goes away, the problem is in that file. Re-enable and fix the specific rule.
Multiple .htaccess files
Apache processes .htaccess files in parent directories first, then child directories. A redirect in /var/www/.htaccess can conflict with one in /var/www/html/.htaccess. Check all of them.
Step 4: Fix Cloudflare SSL Mode
If you use Cloudflare, this is one of the most common causes.
| SSL Mode | Behavior | Loop Risk |
|---|---|---|
| Off | No HTTPS from Cloudflare | No loop, but no HTTPS |
| Flexible | HTTPS to user, HTTP to your server | HIGH — if your server also forces HTTPS |
| Full | HTTPS to user, HTTPS to your server (no cert validation) | Low |
| Full (Strict) | HTTPS to user, HTTPS to your server (validated cert) | None |
The fix: Set Cloudflare SSL mode to Full or Full (Strict). If you have a valid SSL certificate on your origin (you should), use Full (Strict).
Go to Cloudflare Dashboard > SSL/TLS > Overview and change the mode.
Trace your redirect chains
Find redirect loops, broken chains, and unnecessary hops instantly.
Step 5: Fix WordPress-Specific Issues
WordPress adds its own layer of redirect complexity.
Check siteurl and home Values
-- Run in your WordPress database (or use phpMyAdmin)
SELECT option_name, option_value
FROM wp_options
WHERE option_name IN ('siteurl', 'home');
Both values must use the same protocol (https://) and the same domain format (with or without www — but consistent). A mismatch creates a loop.
If you cannot access the admin panel, fix it directly in wp-config.php:
define('WP_HOME', 'https://example.com');
define('WP_SITEURL', 'https://example.com');
Check Plugin Conflicts
SSL plugins (Really Simple SSL, WP Force SSL), caching plugins, and redirect plugins can conflict with each other or with server-level redirects.
Disable all plugins via FTP/SFTP
Rename the wp-content/plugins directory to wp-content/plugins_backup. This deactivates all plugins at once.
Test the site
If the redirect loop stops, reactivate plugins one at a time to identify the culprit.
Restore and fix
Rename the folder back to plugins and deactivate only the problem plugin from the admin panel.
Step 6: Check for CDN or Load Balancer Issues
If you use a CDN or load balancer that terminates SSL, the backend server may not know the original request was HTTPS. It sees HTTP and redirects to HTTPS, which the CDN/LB sends back as HTTP again.
The fix: Configure your backend to check the X-Forwarded-Proto header instead of the direct connection protocol:
# Apache — redirect only when the original client request was HTTP
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
# Nginx — same logic
if ($http_x_forwarded_proto = "http") {
return 301 https://$host$request_uri;
}
Quick Diagnostic Checklist
Client-side checks
- Clear cookies for the specific domain
- Test in incognito/private browsing mode
- Try a different browser
- Try a different network (phone hotspot)
Server-side checks
- Check
.htaccessfor conflicting redirect rules - Verify Cloudflare SSL mode is Full or Full (Strict)
- Check WordPress
siteurlandhomematch the protocol - Disable plugins to isolate conflicts
- Verify CDN/load balancer forwards
X-Forwarded-Proto
Related Articles
Most redirect loops come from SSL misconfigurations. Check Cloudflare, check .htaccess, check your protocol settings — in that order.
Never miss a broken redirect
Trace redirect chains and detect issues before they affect your users and SEO. Free instant tracing.