Fix “Too Many Redirects” Error in WordPress | The WP Doctor

Stay in the loop

Subscribe to the newsletter for all the latest updates

Subscription Form

How to Fix the “Too Many Redirects” Error in WordPress

Table of Content

What Is the “Too Many Redirects” Error?

This error occurs when your website keeps redirecting back and forth between two or more URLs in an endless loop. Instead of loading your site, the browser gives up and displays the “ERR_TOO_MANY_REDIRECTS” message.

The causes can range from a simple URL mismatch in WordPress settings to misconfigured HTTPS rules on the server. The good news? It’s fixable in just a few steps.


Step 1: Clear Cache and Cookies

Before digging into technical fixes, always start with the basics:

  • Clear your browser cache and cookies.
  • Clear your WordPress cache plugin (e.g., W3 Total Cache, WP Rocket).
  • If your host provides server-level caching, clear that too.

Sometimes, outdated redirects cached in the browser can trigger the loop.


Step 2: Check WordPress and Site URL Settings

Go to Settings > General in your dashboard. Make sure the WordPress Address (URL) and Site Address (URL) match.

  • If your site uses https://example.com, both fields should reflect this.
  • Mismatched http and https or www vs. non-www can create a loop.

If you can’t access wp-admin, add the URLs directly into wp-config.php:

define('WP_HOME', 'https://example.com');
define('WP_SITEURL', 'https://example.com');

Step 3: Review Plugin Conflicts

Plugins that manage redirects, SSL, or SEO often cause issues. To check:

  1. Connect via FTP or File Manager.
  2. Rename the /plugins/ folder to /plugins.off/.
  3. Reload your site. If it works, a plugin is the culprit.
  4. Restore the folder name and disable plugins one by one.

Step 4: Fix .htaccess or Nginx Rules

On Apache servers, reset your .htaccess to the default WordPress version:

# 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

On Nginx, check for duplicate or conflicting rules:

server {
  listen 80;
  server_name example.com www.example.com;
  return 301 https://example.com$request_uri;
}

Ensure there’s only one redirect rule pointing traffic consistently.


Step 5: Check HTTPS and CDN Settings

If you’re using Cloudflare, set SSL to Full (Strict). Using “Flexible SSL” often causes redirect loops because Cloudflare forces HTTPS while your server responds with HTTP.

If you’re on a reverse proxy or load balancer, add this to wp-config.php:

if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
  $_SERVER['HTTPS'] = 'on';
}

Preventing Future Redirect Loops

  • Decide on one canonical version (www or non-www, https or http) and stick to it.
  • Manage redirects at the server level rather than multiple plugins.
  • Keep plugins and server configs updated.

Final Thoughts

The “Too Many Redirects” error can be frustrating, but once you know where to look, it’s straightforward to fix. Start with the simple checks—cache, URLs, and plugins—before diving into server rules and CDN configurations.

💡 Pro Tip: After fixing, test your site with tools like Redirect Checker to confirm that all redirects are pointing correctly.

Featured Posts

Featured Posts

The WP Doctor brings you the latest news, insights, and trends in web technologies and WordPress. Stay updated with expert tips, resources, and innovations shaping the digital world.

Featured Posts

Follow Us