ERR_TOO_MANY_REDIRECTS — How to Fix Redirect Loops (Nginx, Apache, Cloudflare)
If your browser shows:
ERR_TOO_MANY_REDIRECTS
“This page isn’t working. example.com redirected you too many times.”
you’re stuck in a redirect loop.
This guide explains why it happens and exactly how to fix it, even if you’re using Cloudflare, Nginx, Apache, WordPress, or Flarum.
—
✅ Quick Answer (Featured Snippet Optimized)
ERR_TOO_MANY_REDIRECTS happens when a website keeps redirecting between URLs endlessly (for example HTTP → HTTPS → HTTP).
Fix it by checking SSL settings, Cloudflare proxy mode, .htaccess or Nginx redirects, and clearing cookies/cache.
—
❓ What Causes ERR_TOO_MANY_REDIRECTS?
In simple terms:
Your site is telling the browser:
“Go here → no, go there → no, go back → repeat forever.”
The most common causes:
HTTP ↔ HTTPS redirect conflict
Cloudflare SSL mode mismatch
Duplicate redirects in .htaccess or Nginx
CMS forcing HTTPS while server already does
Cached cookies storing bad redirects
—
🛠️ FIX 1: Cloudflare Users (MOST COMMON)
If you use Cloudflare, this alone fixes 70% of cases.
Correct Cloudflare SSL setting
Go to Cloudflare → SSL/TLS → Overview
Set:
$$
SSL Mode: Full
$$
⚠️ DO NOT use “Flexible” if your server already has SSL.
Flexible SSL is the #1 cause of redirect loops.
—
🛠️ FIX 2: Check HTTP → HTTPS Redirects (Server Side)
❌ Problem
✅ Solution
Use ONE place only to force HTTPS.
—
Apache (.htaccess) — Correct Example
$$
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
$$
⚠️ Make sure this block exists only once.
—
Nginx — Correct Example
$$
server {
listen 80;
server_name example.com www.example.com;
return 301 https://example.com$request_uri;
}
$$
—
🛠️ FIX 3: CMS URL Mismatch (WordPress / Flarum)
Check your site URLs:
They must match exactly.
Examples:
❌ Mixing these causes loops.
—
For Flarum
Check config.php:
$$
‘url’ => ‘https://example.com’,
$$
Make sure:
—
🛠️ FIX 4: Clear Browser Cookies (Important)
Browsers remember redirects.
Quick test:
If it works in incognito → cookies were the issue.
—
🛠️ FIX 5: Disable Conflicting Redirect Rules
Temporarily:
Redirect loops often come from duplicate logic.
—
🧪 How to Confirm It’s Fixed
Open the site in incognito
Test with and without www
Try mobile data
Reload Cloudflare cache (if used)
If it loads instantly → fixed ✅
—
⚠️ What NOT to Do
❌ Don’t stack multiple redirect rules
❌ Don’t use Cloudflare Flexible SSL with server SSL
❌ Don’t redirect both in CMS and server
❌ Don’t forget to clear cookies
—
📌 Summary
Error: ERR_TOO_MANY_REDIRECTS
Cause: Redirect loop
Fix: One HTTPS rule, correct SSL mode, clean URLs
Difficulty: Easy–Medium
Risk: None
—
💬 Your Turn
Still stuck?
Post details below and we’ll pinpoint it fast 👇
—
📌 Related Fixes You May Need
—
#redirects #ssl #cloudflare #weberrors #hosting