How to Fix ERR_TOO_MANY_REDIRECTS in WordPress

How to Fix ERR_TOO_MANY_REDIRECTS in WordPress

If you run a WordPress website, you may encounter the ERR_TOO_MANY_REDIRECTS error at some point. This commonly happens when your website is stuck in an infinite redirect loop, preventing your browser from reaching out to the correct web server and loading the desired web page content.

This article will show several ways to solve the ERR_TOO_MANY_REDIRECTS error. You will also learn what causes it and how it looks on different web browsers.

What Is ERR_TOO_MANY_REDIRECTS?

The ERR_TOO_MANY_REDIRECTS error happens when a browser can’t connect to the correct server of your website. The browser goes back and forth through multiple URLs and servers trying to locate your WordPress website. As a result, the website sends users into a redirection loop that will never come to an end.

This redirect loop error occurs due to a few reasons:

  • Misconfigured WordPress website address ‒ happens when your website points at the wrong domain or has a typo in the domain name or the www prefix. 
  • Corrupted browser cookies and outdated cache ‒ the most common culprit and the easiest to fix.
  • Faulty WordPress plugin ‒ caused by a corrupted, outdated, or misconfigured plugin.
  • Incorrect HTTPS settings ‒ occurs when you misconfigure the SSL certificate or HTTPS redirect rules.
  • Misconfigured server settings ‒ happens when the .htaccess file has a faulty variable. 
  • Issues with third-party services ‒ for example, misconfigured content delivery network (CDN).

Fortunately, there are several methods to fix the ERR_TOO_MANY_REDIRECTS error. We will cover each one later in the article.

How Does ERR_TOO_MANY_REDIRECTS Look Like On Different Browsers

Each web browser has its way of warning users when they visit a website with the ERR_TOO_MANY_REDIRECTS error. Take a look at what several popular browsers show when you experience this problem.

Google Chrome

Google Chrome will show the redirect loop error as “This page isn’t working. example.com redirected you too many times. The browser will recommend a solution to solve it, followed by the ERR_TOO_MANY_REDIRECTS error message confirming the problem.

Google Chrome err_too_many_redirects error message.

Microsoft Edge

Microsoft Edge will show this error as “This page isn’t working right now. example.com redirected you too many times”, followed by the ERR_TOO_MANY_REDIRECTS error message.

Microsoft Edge error message for err_too_many_redirects.

Mozilla Firefox

Mozilla Firefox’s error message says, “The page isn’t redirecting properly. Firefox has detected that the server is redirecting the request for this address in a way that will never complete.”

Mozilla Firefox error message for err_too_many_redirects.

Safari

Safari will show the error as “Safari can’t open the page ‒ Too many redirects occurred trying to open “example.com.” This might occur if you open a page that is redirected to open another page which is then redirected to open the original page.”

Safari error message for err_too_many_redirects.

Opera

Opera’s error message looks similar to Chrome’s, which is “This page isn’t working. example.com redirected you too many times”, followed by the ERR_TOO_MANY_REDIRECTS error label.

Opera error message for err_too_many_redirects.

How to Fix ERR_TOO_MANY_REDIRECTS

There are a few ways to fix the ERR_TOO_MANY_REDIRECTS error. We recommend trying each of them individually to find the cause of the redirect loop problem, but make sure to track your steps so that you can reverse the changes if needed.

That said, here are the six troubleshooting steps to follow in case of the ERR_TOO_MANY_REDIRECTS error in WordPress.

1. Deleting Browser Data

Browser data sometimes stores corrupted cookies and outdated cache, causing the ERR_TOO_MANY_REDIRECTS error. So, before making changes to your WordPress site, it’s wise to check if it’s just your browser causing the error by deleting its data history.

Here are the steps you should follow to delete the browser’s cache and cookies:

On Chrome, click the three small dots on the browser’s upper-right menu and select Settings. Scroll down and click on Advanced -> Clear Browsing Data. Check the Cookies and other site data and Cached images and files boxes, click Clear data.

Clearing browing history and cached images on Google Chrome.

On Mozilla, head to the upper-right menu button, select Options. Choose Privacy and Security, select Clear Data under Cookies and Site Data. Make sure to check all the boxes, and then click Clear.

Clearing browing history and cached images on Mozilla.

On Safari, navigate to Settings -> Preferences. Under Privacy, select Remove All Website Data -> Remove Now. Here, you can set your cookie and cache preferences as well.

Clearing browing history and cached images on Safari.

On Microsoft Edge, navigate to Settings -> Cookies and site permissions. Select Manage and delete cookies and site data -> See all cookies and site data. Click on the Remove all button, and then choose Clear.

Clearing browing history and cached images on Microsoft Edge.

2. Checking the URL Settings

If clearing your browsing data doesn’t fix the problem, check if your WordPress URL settings have the correct configuration.

The redirect loop error usually occurs when webmasters accidentally make their WordPress site point at the wrong domain when migrating hosts or changing domain names. 

You can do so through the WordPress admin dashboard or manually.

Checking and Changing URL Settings Manually

When your website is experiencing the ERR_TOO_MANY_REDIRECTS error, you might not be able to access your WordPress admin area. In that case, change the URL settings by editing the wp-config.php file through your File Manager or an FTP client like FileZilla.

We will show you how to edit the file via Hostinger’s File Manager.

  1. Log in to the hPanel and head to File Manager under Files.
    hpanel file manager
  2. In the public_html directory, find your wp-config.php file and right-click to Edit.
    hpanel edit wp-config file
  1. Add the following lines to the file. In this case, http://example.com is your domain name:
    define('WP_HOME','http://example.com');
    define('WP_SITEURL','http://example.com');

    hpanel edit file
  1. After saving the changes, visit your WordPress site to check whether the URL change fixed the ERR_TOO_MANY_REDIRECTS error.

Edit URL Settings via Database

Alternatively, you can edit the URL settings via your WordPress database. The following tutorial will show you how to do it using phpMyAdmin.

  1. Find your WordPress database name via the wp-config.php file.
  2. Log in to the hPanel and navigate to phpMyAdmin under Databases. Select the Enter phpMyAdmin button next to the database connected to your WordPress site.
    hpanel phpmyadmin
  1. Access the SQL tab within the phpMyAdmin area.
    phpMyAdmin SQL tab
  1. Enter the following SQL query, making sure to replace oldurl.com with the current WordPress address and newurl.com with the new site address:

    UPDATE wp_options SET option_value = replace(option_value, 'oldurl.com', 'newurl.com') WHERE option_name = 'home' OR option_name = 'siteurl';UPDATE wp_posts SET guid = replace(guid, 'oldurl.com','newurl.com');UPDATE wp_posts SET post_content = replace(post_content, 'oldurl.com', 'newurl.com');

    UPDATE wp_postmeta SET meta_value = replace(meta_value,'oldurl.com','newurl.com');
  1. Click Go to execute the query. Open the wp-options table and check the option_value of siteurl and home to see whether the update process was successful.
    phpmyadmin wp_options

If you need more information, make sure to check our tutorial about how to change WordPress URLs in MySQL database using phpMyAdmin.

If your website file is in the default root folder (/public_html/), you can use the default (http://example.com/) URL. If it’s in a subfolder like (/wp/), then replace the URL with something like (http://example.com/wp).

Changing URL Settings via Administrator Dashboard

Another solution to change the URL settings is through your WordPress dashboard. Follow the steps below if you can log in to the admin dashboard.

  1. Navigate to Settings from your WordPress admin dashboard.
  2. On the General Settings page, check your WordPress Address (URL) and Site Address (URL).
    wordpress general settings
  3. Make sure both URLs are configured correctly. If you edit them, don’t forget to save any changes made.  

3. Deleting WordPress Cache

Your browser isn’t the only place prone to storing corrupted cache. In some cases, cache stored on your WordPress site may cause the ERR_TOO_MANY_REDIRECTS error. To clear your cache, pick one of these two options.

1. Using the WP Fastest Cache Plugin

WP Fastest Cache is a freemium WordPress cache plugin. The caching feature included in the free version is more than enough to help you delete the cache stored on the website. 

Here’s how to clear the website cache using the WP Fastest Cache plugin:

  1. Log in to your WordPress dashboard. Head to Plugins -> Add New.
  2. Find WP Fastest Cache using the search bar and click Install Now -> Activate to set up the plugin. Refer to our guide for more information on how to install WordPress plugins.
  3. Look for the WP Fastest Cache option under Settings.
  4. On the Delete Cache tab, choose which option best suits your needs.
    wp fastest cache wordpress options
  5. If the process is successful, a confirmation message will appear at the top of the page.

2. Using the WP Rocket Plugin

wprocket landing page

WP Rocket is a premium WordPress cache plugin. Besides being compatible with popular themes, plugins, and hosting providers, WP Rocket also comes with features that adhere best practices in web performance. Its prices range from $49/year to $249/year.

To clear the website cache using the WP Rocket plugin, follow these steps:

  1. After purchasing the plugin’s license, download it to your computer. Upload the plugin file to WordPress and install it manually.
  2. Access the WP Rocket dashboard.
  3. Select Clear Cache under Quick Actions to remove all cached files.

4. Disabling Corrupted Plugins

Another problem that might cause the ERR_TOO_MANY_REDIRECTS error message is a corrupted or outdated plugin. In some cases, certain WordPress plugins that implement redirects might conflict with your server’s redirects.

To check whether that’s the source of the problem, disable all of your plugins by manually editing the folder.

You can do so through your hosting provider’s File Manager or an FTP client. Here, we’ll be using the latter.

  1. First, configure your FileZilla client. If you need more information on how to do it, we provide a comprehensive guide to help you use FileZilla.
  2. Once you’re logged in, select Remote Site. Go to wp_content and locate the Plugins folder.
    filezilla renaming plugins folder
  3. Right-click the folder and rename it to plugins_disabled. Try to access your website. If the error message no longer appears, then one or more plugins are corrupted or outdated.
  4. Rename the folder back to Plugins and follow the same troubleshooting process with each plugin’s folder to check which one is causing the error. We recommend starting with the one most recently installed. 

5. Disabling the .htaccess File

There’s a possibility that a faulty variable or conflicting redirect rules in your .htaccess file is making your website go into a redirect loop. If that’s the issue, disabling the file lets you regain access to the site. 

We will walk you through the process of disabling the .htaccess file via Hostinger’s File Manager.

  1. Access the File Manager via Hostinger’s hPanel.
  2. Locate your .htaccess file.
  3. Right-click to Rename the file. You can use .htaccess_disabled, for example.
    hpanel file manager rename
  4. Now check if the website is loading correctly.

If it works, check the .htaccess file’s configuration by right-clicking on it and selecting Edit. It should look like the default .htaccess configuration. Otherwise, delete the content from the file and paste these default rules instead:

# 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

hpanel edit file

Rename the file back to .htaccess, and you’re done. If misconfigurations in the file caused the redirect loop error, this method should fix the problem immediately.

Since replacing your previous .htaccess settings may break your website settings, you should always make a backup of the original file before making any changes.

6. Turn Off the Content Delivery Network (CDN) Temporarily 

Another possible culprit of a redirect loop error is a third-party service installed within your host. In most cases, it’s the CDN configuration. CDN is a network of proxy servers placed in different locations to ensure high website load speed.

The problem with redirect loops arises when your CDN has its SSL option set to Flexible, which means it sends unencrypted requests to your site’s server.

If your website is configured to redirect all HTTP requests to HTTPS when using the flexible mode, it will cause a redirect loop issue. 

If that’s the case, configuring the CDN’s SSL settings to Full or Full (strict) should solve the issue if you have an active SSL certificate. Before doing so, first, confirm that your CDN is causing the error by disabling it temporarily.

For the following tutorial, we will use Cloudflare. Here are the steps you should follow to disable Cloudflare temporarily:

  1. From the Cloudflare dashboard, navigate to the Overview tab.
    cloudflare overview tab
  1. Locate the Advanced Actions section at the bottom right of the page.
    cloudflare advanced options
  1. Select Pause Cloudflare on Site.

If you’re using Hostinger as your hosting provider, go to your hPanel to disable Cloudflare and fix the redirect loop. Here’s how to do it:

  1. Navigate to the Cloudflare menu under Domains on your hPanel dashboard.
  2. Turn off the SSL/Encrypt communication setting, and then click Save.
    hpanel cloudflare central settings

After disabling Cloudflare, it’s recommended to clear the cache once more.

Conclusion

In this tutorial, you have learned several methods to fix the ERR_TOO_MANY_REDIRECTS error on your WordPress website. Here’s a quick recap of these methods:

  1. Delete cookies and browsing data
  2. Check and edit the URL settings
  3. Use a WordPress plugin to delete the website cache
  4. Check and disable faulty plugins through an FTP client
  5. Disable and edit the .htaccess file
  6. Temporarily disable the CDN

If you know other methods you want to share or have any questions about the redirect loop error, leave us a comment below.

Author
The author

Tomas A.

Tomas is a senior customer support agent at Hostinger. Besides providing top-notch technical advice on a daily basis, he likes to create websites and do various coding side projects.