How to Fix "Too Many Redirects" in WordPress
The WordPress too many redirects error (ERR_TOO_MANY_REDIRECTS) has a handful of specific causes. Here is how to find and fix each one in under 10 minutes.
The WordPress ERR_TOO_MANY_REDIRECTS error is caused by a redirect loop — most commonly a misconfigured WordPress Address or Site Address in Settings, conflicting HTTPS force-redirect rules between a plugin and the server, or a reverse proxy that is not passing the correct HTTPS headers.
ERR_TOO_MANY_REDIRECTS - also called a redirect loop - means your browser kept following redirects until it hit the maximum limit and gave up. The page never loads. The error is consistent across Chrome, Firefox, and Safari, though the exact message differs:
- Chrome:
This page isn't working. yourdomain.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
A redirect loop usually means something is sending the visitor from URL A to URL B, and something else is immediately sending them back to A - infinitely.
Step 1 - Clear browser cookies and cache
Before investigating server-side causes, rule out the simplest one: your browser has cached an old redirect. Open an incognito/private window and try the site. If it loads in incognito but not normally, clear your browser cache and cookies for that domain, then reload.
Also test from a different network or device - your corporate firewall or ISP DNS may be caching stale redirect responses.
Step 2 - Check WordPress URL settings
The most common cause on newly-migrated or recently-SSL'd sites: WordPress address and Site Address do not match the actual URL being requested, causing WordPress to redirect forever trying to reach its own configured URL.
In wp-config.php, check:
define( 'WP_HOME', 'https://yourdomain.com' ); define( 'WP_SITEURL', 'https://yourdomain.com' );
If you cannot access the admin to check these, look them up in the database:
wp option get siteurl wp option get home
Or in MySQL:
SELECT option_name, option_value FROM wp_options
WHERE option_name IN ('siteurl', 'home');
Common mismatches:
- One is HTTP, the other is HTTPS
- One has
www., the other does not - Migration leftover: old domain still set
- Typo in the domain
Set both to exactly the same value and ensure it matches your SSL certificate's domain.
Step 3 - Fix the Cloudflare flexible SSL redirect loop
This is the single most common cause of redirect loops on WordPress sites. The setup goes:
- WordPress Site Address is set to
https://... - WordPress therefore redirects HTTP requests to HTTPS
- Cloudflare is set to "Flexible SSL" mode, which means Cloudflare talks to your origin server over HTTP
- Your origin server receives an HTTP request and redirects it to HTTPS
- Cloudflare re-fetches the HTTPS URL... over HTTP to your origin... which redirects... forever
The fix: in Cloudflare > SSL/TLS, change the encryption mode from Flexible to Full or Full (strict). Full means Cloudflare connects to your origin over HTTPS. Full (strict) additionally validates your origin certificate.
If you do not have an actual SSL certificate installed on your origin server, you cannot use Full (strict) - get a Let's Encrypt certificate first.
Alternatively, if you must use Flexible SSL temporarily, remove the HTTPS redirect from WordPress/your server config so there is no loop.
Step 4 - Check .htaccess redirect rules
Open your .htaccess file. Conflicting or incorrect rewrite rules are a common cause of loops, especially after migrations or plugin installations that write their own rewrite rules.
A healthy WordPress .htaccess looks like this:
# 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
Remove anything outside this block that you did not intentionally add. Watch for:
- Double HTTPS redirect rules (one from a security plugin, one manually added)
- Redirect rules pointing to both
wwwand non-wwwversions creating a loop - Old rules from a previous CMS or framework
To check for a loop without a browser, use curl which shows you every redirect in the chain:
curl -IL --max-redirs 10 http://yourdomain.com
-I fetches headers only, -L follows redirects, and --max-redirs 10 caps it at 10 redirects. You will see the full redirect chain:
HTTP/1.1 301 Moved Permanently Location: https://yourdomain.com/ HTTP/1.1 301 Moved Permanently Location: http://yourdomain.com/ <-- going back to HTTP = loop
Step 5 - Check reverse proxy headers
If your WordPress is behind Nginx as a reverse proxy (Nginx > Apache, or a load balancer > Nginx > PHP-FPM), WordPress needs to correctly detect that the connection is HTTPS.
Without the right header, WordPress sees an HTTP request (because the proxy communicates with the backend over HTTP) and redirects to HTTPS - which the proxy also sends as HTTP - causing a loop.
In wp-config.php:
if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] )
&& 'https' === $_SERVER['HTTP_X_FORWARDED_PROTO'] ) {
$_SERVER['HTTPS'] = 'on';
}
Make sure your proxy is actually sending this header. In Nginx:
proxy_set_header X-Forwarded-Proto $scheme;
Or for FastCGI:
fastcgi_param HTTPS on; # only if your site is HTTPS-only
Step 6 - Disable HTTPS redirect from a plugin
Some security plugins (Really Simple SSL, WP Force SSL, Solid Security) add HTTPS redirect functionality. If more than one plugin is enforcing HTTPS redirects, or if a plugin's redirect conflicts with a server-level redirect, you get a loop.
Deactivate all security and redirect plugins via FTP:
mv /wp-content/plugins/really-simple-ssl /wp-content/plugins/really-simple-ssl_disabled
If the loop stops, one of those plugins was the cause. Re-enable them one by one to identify which one.
If you already have server-level HTTPS redirects in Nginx or .htaccess, you do not need a plugin to force HTTPS. Disable the plugin's redirect feature and rely on the server rule alone.
Step 7 - www vs non-www redirect conflict
A redirect loop can occur when:
- Your server redirects
yourdomain.comtowww.yourdomain.com - WordPress
WP_HOMEis set tohttps://yourdomain.com(no www) - WordPress redirects
www.yourdomain.comback toyourdomain.com - Loop
Decide on one canonical domain (www or non-www) and ensure:
- The server redirect points to the canonical domain
WP_HOMEandWP_SITEURLmatch the canonical domain exactly- The SSL certificate covers the canonical domain
In Nginx, a clean www to non-www redirect:
server {
listen 443 ssl;
server_name www.yourdomain.com;
return 301 https://yourdomain.com$request_uri;
}
Step 8 - Check for multisite misconfiguration
On WordPress multisite, incorrect DOMAIN_CURRENT_SITE or PATH_CURRENT_SITE constants in wp-config.php can cause specific subsites to redirect to themselves infinitely. Check:
define( 'DOMAIN_CURRENT_SITE', 'yourdomain.com' ); // no https://, no trailing slash define( 'PATH_CURRENT_SITE', '/' );
Also check whether the sub-site's URL in the Network Admin matches the actual domain it is being accessed at.
Diagnostic checklist
Work through this in order - the most common causes are first:
- Try in incognito - if it works, clear cookies/cache
- Check
WP_HOMEandWP_SITEURLinwp-config.php- must be identical and HTTPS - Check Cloudflare SSL mode - must be Full or Full (strict), not Flexible
curl -IL http://yourdomain.com- trace the redirect chain- Check
.htaccessfor conflicting redirect rules - Add
HTTP_X_FORWARDED_PROTOcheck towp-config.php - Disable all redirect/security plugins via FTP
- Check www vs non-www consistency in server config and WordPress settings
Related reading
Frequently Asked Questions
How do I fix too many redirects in WordPress?
What causes WordPress redirect loops after enabling HTTPS?
How do I fix ERR_TOO_MANY_REDIRECTS when I cannot access WordPress admin?
Can Cloudflare cause a WordPress redirect loop?
// new_articles
Get notified when new guides drop
Practical WordPress guides from a working agency owner. No filler. Unsubscribe any time.
Was this article helpful?
Thanks for the feedback!