We come across a lot of different errors when working with our customers, and ERR_TOO_MANY_REDIRECTS is one of the most common. It usually appears after the updates in the WordPress site, due to an incorrect redirect configuration on the server or due to incorrect settings of third-party services. However, you do not need to worry. This ERR_TOO_MANY_REDIRECTS error is very easy to fix. Read the recommendations below, which will help you to solve this problem.

What kind of error is this: ERR_TOO_MANY_REDIRECTS?

As it follows from the name ERR_TOO_MANY_REDIRECTS, the essence of the error lies in the fact that your site enters an infinite redirect cycle. Usually, the site stops working (URL 1 points to URL 2, and URL 2 points to URL 1, or the domain redirects you too many times), and, unlike other errors, this problem itself is not solved, so you have to take some actions to fix it.

There are several variations of this error, depending on the browser that you are working with.

Google Chrome

In Chrome, this error is displayed as ERR_TOO_MANY_REDIRECTS or “This webpage has a redirect loop problem”.

Error text: This page is not working. domain.com redirected you too many times.

Mozilla Firefox

In Mozilla Firefox, the error is displayed as “The page is not redirecting properly”.

Error text: Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

Microsoft Edge

In Edge, the error is displayed as “Hmmm … cannot reach this page”. Which, of course, does not explain the essence of the problem.

Below are some recommendations that will help you to fix this error.

Clearing cookies for the website

Google and Mozilla recommend trying to clear cookies, which is displayed as recommendations on the page with an error. Cookies can sometimes contain erroneous data, which lead to the appearance of ERR_TOO_MANY_REDIRECTS. You can try to follow this recommendation, even if you notice such a mistake on a site that does not belong to you (to access it).

Cookie files retain the status of “logged in” on sites, and store various settings, and so we recommend that you simply delete the cookies for the site that led to the error. This does not affect your other sessions and other sites that you often visit.

Follow these steps to clear the cookie in Chrome.

  1. In Google Chrome, click on the button with three dots in the upper right corner of the screen. Go to Settings.
  2. Scroll down and click on Advanced.
  3. Choose Content settings.
  4. Click on Cookies
  5. Select See all cookies and site data
  6. We are looking for the domain for which the ERR_TOO_MANY_REDIRECTS error was displayed. Delete cookies that are currently stored on your computer for this domain. We try to visit the site again.

Clean the server, proxy and browser cache

Redirection cycles are the answers that you can cache, so we recommend you try to clear the cache on your WordPress site, in third-party proxy services and in your browser.

Clean the server cache

Many WordPress webhosts offer their tools to clear the cache on your WordPress site. This is usually done from the control panel of your hosting, since the error most likely will not allow you to access the WordPress console.

Clean the proxy cache

If you use a reverse proxy server, such as Cloudflare or Sucuri, you can try to clear their cache.

Cloudflare

To clear the Cloudflare cache, go to the service console, select Caching and click Purge Everything.

Sucuri

To clear the Sucuri cache, enter the service console, select Performance and click Clear Cache.

Clearing the browser cache

If you want to check and see if the problem is related to the browser cache, you can simply open your browser in incognito mode. Either test another browser to see if the error ERR_TOO_MANY_REDIRECTS is disappeared or not.

If the problem is caused by the browser cache, you can clear it. You can always find in the network instructions for clearing the cache of the browser you are using.

Determine the nature of the cycle of redirects

If cleaning the cache did not help, you can find out the reason for the redirect loop. The free Redirect Checker tool will help you understand exactly what happened. The same can be done through cURL.

An extension for Chrome called Redirect Path can also be very useful. It shows information on all redirects that occurred on the site (for a specific URL or page).

Checking HTTPS settings

Another reason for the ERR_TOO_MANY_REDIRECTS error is HTTPS settings. We very often saw that the error occurs after the user moved his site to HTTPS and either did not complete the process or set up something incorrectly.

1. Do not migrate to HTTPS without an SSL certificate.

We face this problem on a regular basis. If you do not install the SSL certificate on the server, and at the same time force your site to load on HTTPS, you will immediately enter an endless loop of redirects. To fix this, just install the SSL certificate.

We recommend that you verify that the SSL installation is correct. SSL / TLS certificates require you to install not only the primary certificate, but also the root and intermediate certificates (chains). All of them must be correctly installed.

Go to the SSL verification tool, enter your domain, and then run the scan. To scan an SSL / TLS configuration on your site, it may take some time (about a minute).

2. Do not use the plug-ins for SSL, update the links prescribed in the code.

There are free plugins that allow automatic redirection to HTTPS. However, we do not recommend this method, because third-party plug-ins lead to additional problems and compatibility issues. This is only a temporary solution. You must manually update all HTTP links in the code. To do this, you will need to perform a search and replace in WordPress.

3. Check the redirects from HTTP to HTTPS on the server

It is possible that the redirect rules to HTTPS are incorrectly configured on the server.

Redirect from HTTP to HTTPS for Nginx

If your web server is running on Nginx, you can easily redirect all traffic from HTTP to HTTPS using the following code that you need to add to the Nginx configuration file. The recommended method for redirecting WordPress to Nginx is:

Redirect from HTTP to HTTPS for Apache

If your web server is running on Apache, then you can redirect your traffic from HTTP to HTTPS using the following code that you need to add to the .htaccess file. The recommended method for redirecting WordPress to Apache is:

4. We check for the error “Too Many HTTPS Redirects”.

You may have too many HTTPS redirects. You can check this with a special tool called Redirect mapper. Below is an example of redirects that are not configured correctly. You can see that there are duplicate HTTPS-redirects that occur both in www and non-www versions.

We check third-party services

ERR_TOO_MANY_REDIRECTS error is often associated with reverse proxy services, such as, for example, Cloudflare. This is usually due to the inclusion of the Flexible SSL option, if you already have an SSL certificate installed on your server with WordPress. Why? When Flexible SSL is selected, all requests to your hosting server are transmitted via HTTP. Most likely, your hosting server already has a redirect with HTTP to HTTPS, and therefore a cycle of redirects occurs.

To fix this, you need to change the Cloudflare Crypto settings from Flexible to Full or Full (strict).

Also, you can use their Always Use HTTPS rules for pages to redirect all users to HTTPS without creating a loop. Another thing you need to follow when working with Cloudflare is to follow the redirection rules for URLs used for redirection. Be careful with creating a redirect for domains that indicate themselves as the destination. This can lead to an endless redirect.

Check the settings of your WordPress website

You should also check the settings of your WordPress site. There are two fields that must be correctly defined. Another popular mistake is that you use an incorrect prefix that does not match your site (with www or without www).

  • WordPress Address (URL): The address used to access your blog.
  • Site Address (URL): The address used to access the main WordPress files.

Both URLs must match if, of course, you did not transfer WordPress to a separate directory.

Most likely, you will not have access to the WordPress console. You can overwrite these settings through the wp-config.php file.

The wp-config.php file is usually located in the root of your WordPress site. It can be accessed via FTP, SSH or WP-CLI. To overwrite WP_HOME and WP_SITEURL, simply enter the following code at the top of wp-config.php by specifying your domain:

Below is an example of how your wp-config.php will look after all the changes:

After manually setting the values ​​for the URL, you can go to your site and check if the error has disappeared.

Temporarily disabling WordPress plugins

Temporarily disabling WordPress plug-ins can be a quick way to solve problems. If you have plug-ins that do redirects, they can cause a redirect cycle.

Remember that you will not lose any data if you just disable the plugin. Most likely, you will not have access to the WordPress console, so you will need to go through SFTP to the server and rename the folder with plug-ins. Then check your site again.

If the method works, you will need to test each installed plug-in in turn. Rename the plugin folder back to the plugins, and then start renaming the individual plugin folders until you find the culprit. You can also do this on a test site.

Check the redirects on the server

In addition to HTTP redirects to HTTPS on your server, you need to check that there are no other illiterate redirects on the server. For example, one bad 301 redirect may result in the site to stop working. Usually they are located in the configuration files of your server.

.htaccess file for Apache

If you work with the hosting on which Apache is running, you should check the .htaccess file for incorrect rules. Follow the steps below to create a file from scratch.

Login to the site via FTP or SSH, then rename .htaccess to .htaccess_old. As a result, you will always have a backup copy of the file.

To re-create this file, you just need to re-save your permanent links in WordPress. However, if you encounter ERR_TOO_MANY_REDIRECTS, then you most likely do not have access to your WordPress console. In this case, you can create a new .htaccess file and enter the following content into it. Then upload the file to the server. The standard settings for the file are:

In the WordPress code, you can find other examples, in particular, the standard .htaccess for multisites.

Nginx Configuration

If your hosting uses Nginx, then configuring the configuration file will be a bit more complicated, since the config can be different depending on the hosting provider used. We recommend in this case to write in support of hosting and ask them to check the configuration file for the things that can cause the cycle of redirects.