ERR_TOO_MANY_REDIRECTS
Symptoms
Your browser just told you the page has too many redirects. What’s happening: WordPress is sending your request from URL A to URL B, which sends it back to URL A, which sends it to URL B again — an infinite loop. The browser catches this after about 20 cycles and kills the request. The fix is usually straightforward once you know where the loop starts.
What Causes ERR_TOO_MANY_REDIRECTS?
- Mismatched Site URL and WordPress URL — The
siteurlandhomevalues in your database don’t match, or one useshttps://while the other useshttp://. This is the #1 cause I see in client sites. - SSL misconfiguration — Your host serves HTTPS, but WordPress isn’t configured for it, so a plugin or
.htaccessrule forces HTTPS, WordPress redirects to HTTP, and the loop begins. - Conflicting
.htaccessrules — Multiple redirect rules from plugins, hosting panels, or manual edits that contradict each other. - Plugin conflict — A caching plugin, SEO plugin, or redirect manager is creating a rule that clashes with another redirect in the stack.
- Corrupted cookies — Stale WordPress login cookies can trigger redirect loops, especially on the
wp-adminandwp-login.phppages.
How to Fix It
Step 1: Clear Your Browser Cookies for the Site
Before touching any server files, rule out a client-side issue. Stale cookies cause this error more often than people realize.
In Chrome: open Settings → Privacy and Security → Cookies → See all site data, search for your domain, and delete those cookies. Or use this shortcut — visit your site with cookies cleared for just that domain:
chrome://settings/cookies/detail?site=yourdomain.com
Reload the site. If the error persists, it’s server-side. Move to Step 2.
Step 2: Force-Set Your Site URLs in wp-config.php
This bypasses whatever the database says and eliminates the most common cause. Connect via FTP or SSH and open wp-config.php in your site root. Add these lines above the line that says /* That's all, stop editing! */:
define('WP_HOME', 'https://yourdomain.com');
define('WP_SITEURL', 'https://yourdomain.com');
Use https:// if your site has an SSL certificate. Use http:// if it doesn’t. The protocol must match what your server actually serves. Skip this if you want headaches later — getting HTTP vs HTTPS wrong here is exactly what creates the loop.
If you have WP-CLI access, you can check the current values first:
wp option get siteurl
wp option get home
And update them directly:
wp option update siteurl 'https://yourdomain.com'
wp option update home 'https://yourdomain.com'
Step 3: Reset Your.htaccess File
If the URLs are correct and you’re still looping, the .htaccess file is the next suspect. Rename it via FTP or SSH:
mv /path/to/wordpress/.htaccess /path/to/wordpress/.htaccess.bak
Now reload the site. If it works, the old .htaccess had a bad redirect rule. Regenerate a clean one by going to Settings → Permalinks in your WordPress dashboard and clicking Save Changes. WordPress writes a fresh .htaccess automatically.
The right way to do this: compare your .htaccess.bak with the new file to find the offending rule. Don’t just move on and forget about it — that rule came from somewhere, and it’ll come back.
Step 4: Deactivate All Plugins
Still stuck? A plugin is injecting the redirect. Rename the plugins directory to cut them all off at once:
mv wp-content/plugins wp-content/plugins-disabled
Or with WP-CLI:
wp plugin deactivate --all
Reload the site. If the loop stops, reactivate plugins one at a time until the error returns. The last plugin you activated is the culprit. Common offenders: redirection plugins, SSL-forcing plugins, caching plugins, and some security plugins that enforce URL rules.
Step 5: Check for Server-Level Redirects
If none of the above fixes it, the redirect lives outside WordPress. Check these:
- Hosting control panel: Look for forced HTTPS redirects in cPanel, Plesk, or your host’s dashboard. If your host forces HTTPS and a plugin forces HTTPS, you get a double redirect that can loop.
- Cloudflare or CDN settings: If you use Cloudflare, set SSL mode to Full (Strict), not Flexible. Flexible mode is the single biggest cause of redirect loops on Cloudflare sites. Find this under SSL/TLS → Overview.
- Nginx config: If you’re on Nginx instead of Apache, check
/etc/nginx/sites-available/yourdomain.conffor conflictingreturn 301rules.
Step 6: Enable Debug Logging
If you’re still hunting, turn on logging to see the exact redirect chain:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
Add these to wp-config.php, reproduce the error, then check wp-content/debug.log for clues. Look for any wp_redirect() calls or hook callbacks that fire during the request.
Prevention
- Always set Site URL and WordPress URL through wp-config.php on production sites rather than relying on the database values. It’s one less thing that can drift.
- Pick one SSL enforcement method and stick with it. Either your host handles HTTPS redirects, or a plugin does, or
.htaccessdoes — never two of them at once. - Set Cloudflare SSL to Full (Strict) from day one if you use Cloudflare. Flexible mode is a trap that works until it doesn’t.
- Test redirects after every plugin update. A quick
curl -I yourdomain.comshows you the response headers and catches loops before your visitors hit them.
Last verified: April 2026