How to Fix the "Error Too Many Redirects" Issue in WordPress (2024 Guide)

Has your WordPress site suddenly started showing an "error too many redirects" message? This frustrating issue prevents visitors from accessing your site and can hurt your traffic and search engine rankings if not resolved quickly.

But don‘t panic! In most cases, "error too many redirects" has a straightforward cause and can be fixed by following some basic troubleshooting steps. As a WordPress consultant with over a decade of experience, I‘ve helped many clients resolve this error and get their sites running smoothly again.

In this guide, I‘ll walk you through the most common causes of "error too many redirects" and show you how to fix the issue step-by-step. I‘ll also share some tips for preventing redirect loops from happening again in the future.

Whether you‘re a WordPress beginner or an experienced developer, this comprehensive tutorial will give you the knowledge and tools you need to tackle "error too many redirects" with confidence. Let‘s get started!

What Is the "Error Too Many Redirects" Issue?

"Error too many redirects," also known as a redirect loop, happens when your WordPress site gets stuck in an infinite redirection cycle. Instead of loading the requested page, the site keeps redirecting to another URL, which then redirects back to the original URL, creating an endless loop.

Visitors to your site will see an error message like this instead of your website:

"This page isn‘t working. example.com redirected you too many times. Try clearing your cookies. ERR_TOO_MANY_REDIRECTS"

The exact wording of the error varies depending on the web browser, but the "too many redirects" part is a giveaway. In some browsers, you may see a message like "The page isn‘t redirecting properly" instead.

If you‘re seeing this error on your WordPress site, don‘t worry – you‘re not alone. Redirect issues are a common cause of site downtime and can be tricky to troubleshoot, especially if you‘re not technically inclined.

Even popular websites with large development teams sometimes experience this issue. In 2021, Facebook and its associated platforms went down for several hours due to a routing configuration change that triggered a redirect loop.

While your redirect issue probably won‘t make international news, it‘s still critical to fix it as soon as possible to avoid losing traffic and damaging your search engine optimization (SEO). Even a few hours of downtime can negatively impact your site‘s visibility and reputation.

What Causes WordPress Redirect Loops?

Now that you know what the "error too many redirects" issue looks like, let‘s explore some of the most common causes.

1. Plugin conflicts

One of the most common causes of redirect loops is a plugin conflict. Many popular WordPress plugins like Yoast SEO, Redirection, and W3 Total Cache use redirects to improve site performance, fix 404 errors, and optimize URLs for search engines.

Sometimes these redirects can conflict with each other or with your WordPress configuration, triggering an infinite redirection cycle. A plugin may also have a bug or compatibility issue that causes it to generate broken redirects.

2. Incorrect WordPress URL settings

Another common cause of "error too many redirects" is incorrect WordPress URL settings. In the WordPress dashboard, you can specify your site‘s URLs under Settings > General:

WordPress General Settings screen showing the WordPress Address and Site Address fields

Typically, the "WordPress Address (URL)" and "Site Address (URL)" should be set to the same value, like https://example.com. However, sometimes people accidentally enter the wrong URL or include www in one field but not the other.

Even a small inconsistency like including a trailing slash at the end of one URL can trigger a redirect loop.

3. .htaccess file issues

The .htaccess file is a special configuration file used by WordPress to manage redirects and other server settings. It‘s located in the root directory of your WordPress installation.

Some WordPress plugins add custom redirects to the .htaccess file. If these redirects are misconfigured or conflict with other rules in the file, it can cause an infinite redirection cycle.

A corrupt or incorrect .htaccess file can also cause redirect issues even if no plugins are involved. For example, if you migrated your WordPress site to a new server or domain name, a hardcoded URL in the .htaccess file could create a redirect loop.

4. Cloudflare or hosting issues

In some cases, redirect issues can be caused by misconfigured server settings rather than a problem with WordPress itself.

Some WordPress hosting providers use server-side redirects to force HTTPS connections or www/non-www URLs. If these redirects are set up incorrectly, they can conflict with WordPress‘ own redirect rules.

Similarly, if you use Cloudflare‘s CDN and proxy features, incorrect Cloudflare page rules or settings could lead to infinite redirect chains.

Now that we‘ve covered the most likely culprits behind the "error too many redirects" issue, let‘s look at how to troubleshoot and fix it.

How to Fix "Error Too Many Redirects" in WordPress (Step-by-Step)

To resolve the redirect error, we‘ll follow a step-by-step troubleshooting process that eliminates each potential cause one by one. This methodical approach will help you pinpoint the source of the issue and avoid making unnecessary changes to your site.

Before starting, it‘s a good idea to create a complete backup of your WordPress site so you can revert any changes if something goes wrong. You can use a plugin like UpdraftPlus or create a manual backup by downloading your site files and database.

Step 1: Clear your browser cache and cookies

Sometimes, outdated browser cache and cookies can cause redirect issues, especially if you recently changed your WordPress site‘s URL structure. Before trying more advanced troubleshooting steps, clear your browser data to see if that resolves the issue:

  1. Open your web browser and click the settings menu (usually the three dots or lines icon in the top-right corner).
  2. Click "More tools" and then "Clear browsing data."
  3. Set the time range to "All time" and check the boxes next to "Cookies" and "Cached images and files."
  4. Click "Clear data" to delete the browser data.

After clearing your browser cache and cookies, try visiting your WordPress site again. If you still see the "error too many redirects" message, move on to the next step.

Step 2: Deactivate all WordPress plugins

If clearing browser data didn‘t fix the issue, there‘s a good chance a plugin is causing the redirect loop. To determine if a plugin is at fault, you‘ll need to deactivate all of your WordPress plugins and then reactivate them one by one until you find the culprit.

When you‘re locked out of your WordPress dashboard by the redirect error, you‘ll need to deactivate plugins via FTP instead:

  1. Connect to your WordPress site using an FTP client like FileZilla. If you‘re not sure how to do this, ask your hosting provider for instructions.
  2. Navigate to the wp-content directory and rename the plugins folder to plugins-deactivated. This will deactivate all of your plugins at once.

Using FileZilla to rename the plugins folder and deactivate all plugins

  1. Try accessing your WordPress site again. If the redirect error is gone, you‘ve confirmed a plugin was causing it.
  2. Rename the plugins-deactivated folder back to plugins and log in to your WordPress dashboard.
  3. Go to the Plugins page and activate each plugin one by one, checking your site after each activation. When the redirect error returns, you‘ve found the misbehaving plugin.

At this point, you can either replace the faulty plugin with an alternative or contact the plugin‘s support team for help fixing the issue.

Step 3: Check your WordPress URL settings

If deactivating plugins didn‘t resolve the redirect error, the next step is to check your WordPress site‘s URL settings:

  1. Log in to your WordPress dashboard and go to Settings > General.
  2. Check that the "WordPress Address (URL)" and "Site Address (URL)" fields contain the correct URL for your site, including the https:// prefix if your site uses SSL.
  3. Ensure these two fields are set to the exact same URL, with no inconsistencies like extra www or trailing slashes.
  4. If you made any changes, click "Save Changes" at the bottom of the page.

WordPress General Settings screen showing correct URL settings

After saving any URL changes, visit your site to see if the redirect error has been resolved.

If you can‘t access the WordPress dashboard due to the redirect loop, you can override the site URL settings by adding some code to your theme‘s functions.php file:

  1. Connect to your site via FTP and navigate to wp-content/themes/your-theme.
  2. Download the functions.php file and open it in a text editor.
  3. Add the following code at the end of the file, replacing https://example.com with your site‘s correct URL:
update_option(‘siteurl‘, ‘https://example.com‘);
update_option(‘home‘, ‘https://example.com‘);
  1. Save the file and upload it back to the your-theme directory, overwriting the old version.

Now you should be able to log in to WordPress and update the URL settings permanently in the dashboard.

Step 4: Check your .htaccess file

The .htaccess file contains important configuration settings for WordPress, including redirects and rewrite rules. If this file has incorrect or conflicting directives, it can cause an infinite redirect loop.

To check if your .htaccess file is causing the redirect issue:

  1. Connect to your WordPress site via FTP and look for the .htaccess file in the root directory.
  2. Download the .htaccess file and save a copy on your computer as a backup.
  3. Delete the original .htaccess file from your server.
  4. Try accessing your WordPress site. If the redirect error is gone, you‘ve confirmed the .htaccess file was the problem.

At this point, you can regenerate a fresh .htaccess file to restore important WordPress functionality:

  1. Log in to your WordPress dashboard and go to Settings > Permalinks.
  2. Without making any changes, click the "Save Changes" button at the bottom of the page. This will create a new default .htaccess file for WordPress.

If you had custom redirects in your old .htaccess file, you can add them back to the new file one at a time, testing your site after each addition. This will help you pinpoint any specific rules that are causing the redirect error.

If regenerating the .htaccess file didn‘t fix the issue, or if you couldn‘t find an .htaccess file in the first place, move on to the final troubleshooting step.

Step 5: Contact your hosting provider

If you‘ve followed all the troubleshooting steps above and are still seeing the "error too many redirects" message, it‘s possible there‘s an issue with your server configuration or hosting environment.

In this case, reach out to your WordPress hosting provider and ask them to investigate the issue. They can check server logs for any errors and ensure their server-level redirects and other settings are configured correctly.

If you use Cloudflare, you may also want to ask your host to review your Cloudflare settings to rule out any misconfigurations there. Incorrect SSL settings or page rules in Cloudflare could be causing or contributing to the redirect loop.

Tips to Prevent WordPress Redirect Errors

Once you‘ve fixed the "error too many redirects" issue on your site, it‘s important to take steps to prevent it from happening again in the future. Here are some best practices to keep in mind:

  • Keep your WordPress site and all plugins and themes updated to the latest versions. Updates often include bug fixes that could resolve or prevent redirect issues.
  • Be cautious when configuring redirects in plugins like Redirection or Yoast SEO. Double-check that your redirect rules don‘t conflict with each other or with WordPress‘ default behavior.
  • When migrating your WordPress site to a new domain or server, update all URLs in your WordPress settings and database to point to the new location. Use the Better Search Replace plugin to update URLs in bulk.
  • Regularly test your website and check for broken links or other issues that could cause redirect problems down the road. Consider setting up automated website monitoring to alert you if your site goes down.
  • If you use Cloudflare, be careful when configuring page rules and SSL settings to avoid accidental redirect loops. Consult Cloudflare‘s documentation or support if you‘re unsure about the correct settings for your WordPress site.

By following these guidelines and maintaining a regular maintenance routine, you can minimize the risk of encountering the "error too many redirects" issue and keep your WordPress site running smoothly.

Wrapping Up

Encountering the "error too many redirects" message on your WordPress site can be a frustrating and stressful experience, especially if you‘re not sure how to troubleshoot the issue. However, by methodically working through the steps outlined in this guide, you should be able to identify and resolve the underlying cause of the problem.

To recap, here are the key troubleshooting steps to fix the "error too many redirects" issue in WordPress:

  1. Clear your browser cache and cookies
  2. Deactivate all WordPress plugins and reactivate them one by one
  3. Check your WordPress site‘s URL settings in the dashboard
  4. Regenerate the .htaccess file and restore any custom redirects carefully
  5. Contact your hosting provider or Cloudflare support for further assistance

If you‘re still having trouble fixing the redirect error or are uncomfortable making changes to your WordPress files and database, don‘t hesitate to reach out to a professional WordPress developer or support service for help. It‘s better to get expert assistance than risk breaking your site further.

By taking the time to properly diagnose and resolve redirect issues, you can get your WordPress site back up and running and avoid potential negative impacts on your traffic and search rankings. Implementing best practices like keeping your site updated and monitoring it regularly will help prevent redirect errors and other issues in the future.

I hope this guide has been helpful in demystifying the "error too many redirects" issue and giving you the tools and knowledge to fix it on your own WordPress site.

Did you like this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.