WordPress: ERR_TOO_MANY_REDIRECTS / redirected you too many times on wp-admin or the whole site
WordPress and the server/proxy keep redirecting to each other — usually siteurl/home mismatch (http vs https, www vs non-www) or HTTPS detection behind a proxy/load balancer.
Seen on:
WordPress
Meaning
Behind Cloudflare Flexible SSL or a load balancer, WordPress sees plain HTTP and redirects to HTTPS forever. Mismatched WordPress Address/Site Address and server redirect rules also loop.
Common causes
- siteurl/home differ from the actual URL (www, https)
- HTTPS terminated at a proxy without X-Forwarded-Proto handling
- Conflicting redirects in .htaccess/Nginx and a plugin
- Cookie/caching plugin loops on wp-admin
⚡ Quick fix
- Set WP_HOME and WP_SITEURL to the exact canonical URL
- Tell WordPress it’s on HTTPS behind the proxy
- Remove duplicate redirect rules; clear caches
Detailed fix by platform
WordPress
- php
// wp-config.php define('WP_HOME', 'https://www.example.com'); define('WP_SITEURL', 'https://www.example.com'); if (($_SERVER['HTTP_X_FORWARDED_PROTO'] ?? '') === 'https') { $_SERVER['HTTPS'] = 'on'; }
Shell
- php
curl -sIL http://example.com/wp-admin/ | grep -iE '^(HTTP|location)' | head -20 wp option get siteurl && wp option get home
How to diagnose
- Chain — Redirect hops
- Options — siteurl/home
- Proxy — Flexible SSL / X-Forwarded-Proto
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in WordPress
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026