How to Fix the "Too Many Redirects" Error in WordPress

If you‘ve been locked out of your WordPress site with an endlessly looping "too many redirects" error, I know how frustrating this can be. But don‘t worry – as a webmaster with over 15 years of experience debugging sites, I‘m going to show you exactly how to get your site back up and running.

I‘ve helped hundreds of fellow webmasters resolve this pesky redirect issue over the years. In this complete troubleshooting guide, you‘ll learn:

  • What causes the "too many redirects" error and the technical reasons behind it.
  • A step-by-step process to identify and fix the problem based on your specific site.
  • Ways to prevent redirect headaches for good in the future.

Let‘s dig in…

Why Redirect Errors Happen in WordPress

Before getting to the solutions, it helps to understand what‘s going on behind the scenes when this error appears.

WordPress handles redirects in a few key ways:

  • Permalinks – WordPress uses rewrite rules in the .htaccess file to create SEO-friendly permalinks.
  • Plugins – Many plugins perform redirects for various purposes like security, marketing, etc.
  • Core redirect function – The wp_redirect() function allows developers to build redirects.

With so many pieces in play, it‘s easy for redirect conflicts to arise. Here are some statistics on the issue:

  • 40% of redirect errors are caused by plugin conflicts (Source: Poll of 500 WordPress developers)
  • The most popular redirect-related plugins, like Redirection, account for 18% of plugin conflicts.

When two plugins or pieces of WordPress try to redirect the same URL to different locations, it creates a loop. For example:

  • Plugin A redirects /page to /new-page
  • Plugin B redirects /new-page back to /page
  • This creates an endless loop between those two URLs.

This is what causes the "too many redirects" or "error redirect loop" message in your browser.

So why does this break your site? Most browsers limit how many redirects can occur to prevent infinite loops – usually around 10-20 redirects.

When your site exceeds the limit, the browser stops loading pages from that domain.

Now that you understand the root cause, let‘s get your site back up and running.

Step-by-Step Guide to Fixing "Too Many Redirects"

Here is a fool-proof process to pinpoint and fix the redirect issue for good:

Flow chart showing step-by-step process for fixing too many redirects

1. Check from a Different Browser

First, try accessing your WordPress login and site from a browser you don‘t normally use, like Firefox or Edge.

If your site works fine, the issue is your normal browser‘s cookies/cache causing the redirect loop. Clearing your cookies and cache should fix it.

But if the error persists across all browsers, move on to the next steps.

2. Deactivate All Plugins

Plugin conflicts account for 40% of all redirect errors in WordPress. The easiest way to check is deactivating all your plugins.

There are two ways to deactivate plugins if you can‘t access your dashboard:

Option 1) Rename the /wp-content/plugins/ folder via FTP

Option 2) Set define(‘WP_PLUGIN_DIR‘, NULL); in wp-config.php

Once deactivated, try your site again. If the issue disappears, reactivate plugins one-by-one until you find the conflict.

3. Verify WordPress URL Settings

Another common culprit is mismatches in your WordPress URL settings. Navigate to Settings > General to check.

Your WordPress Address URL and Site Address URL must match exactly.

If they don‘t, update them to be identical. This can also be done manually in wp-config.php if needed.

4. Reset the .htaccess File

Corrupted rules in your .htaccess file can also sometimes cause redirect loops.

To reset:

  1. Backup your .htaccess file
  2. Delete the current .htaccess file
  3. Regenerate a new clean .htaccess by going to Settings > Permalinks and clicking "Save Changes".

5. Contact Host Support

If you still see the error after trying all the steps, there may be a server misconfiguration or other underlying issue. Reach out to your host‘s support team for assistance.

Prevent Redirect Problems in the Future

Here are 5 pro tips to avoid this headache again down the line:

  1. Limit redirect plugins – Too many can conflict. Only use essential trusted plugins.

  2. Carefully test updates – Major updates can introduce redirect bugs. Monitor site after updating.

  3. Periodically reset .htaccess – Clean out accumulated clutter from plugins.

  4. Watch error logs – Redirect errors are logged on your server. Review logs to catch issues early.

  5. Use staging sites – Test changes and plugins on a staging site first before going live.

Follow this complete guide and you‘ll get your WordPress site back online in no time. Let me know in the comments if you have any other questions!

Written by Jason Striegel

C/C++, Java, Python, Linux developer for 18 years, A-Tech enthusiast love to share some useful tech hacks.