How Do You Fix the Redirect Loop Error?
If your WordPress site is down because of an ‘ERR_TOO_MANY_REDIRECTS’ error, you are not alone! Almost every other Windows user has faced this mysterious error. The error usually pops up with a text that says, ‘this webpage has a redirect loop’ and then restricts the loading of the entire website. So how do you fix it? Let’s find out!
“ERR_TOO_MANY_REDIRECTS” is just one of the many errors that Windows users come across. This relatively common error is also referred to as a redirect loop .
So why does this error occur in the first place?
Well, the error generally occurs when the user is redirected from the intended URL to a totally new one. However, the user unluckily gets an infinite redirect loop. When your browser detects the situation, it simply breaks this loop and displays the error message.
Why do you fall into an infinite redirect loop?
Well, the origin of this problem could either be caused by the server or the computer of the website visitor.
Typically the error occurs after an immediate change on the WordPress site, a setting change made by third-party services, or an incorrect configuration of redirects on the server. Fortunately, this error is easy to fix. To help you in this regard, let us look at different ways to fix this error. This will help you get your site up and running in no time!
This is one of the errors which rarely gets resolved on its own and requires you to take an appropriate set of steps to fix it. There are many variations of this error. The exact version you see is based on the browser you are using.
If you are using Mozilla Firefox as your default browser, the error message will appear as ‘The page is not redirecting properly’.
This shows that server is simply redirecting the request of a given address in a manner that cannot be completed by Firefox.
When you are using Google Chrome as your browser, you may see this error as 'ERR_TOO_MANY_REDIRECTS' or 'this webpage has a redirect loop problem'.
The browser will display the message that the page is not working. '(Insert domain name) redirected you too many times'.
In the case of Microsoft Edge, the message will display as 'Hmm…can’t reach this page'. Of course, this is not a helpful message and you will end up wondering what should be done to fix it!
Ways to Fix the “ERR_TOO_MANY_REDIRECTS” Error
There are a number of ways to fix the problem. So, stop scratching your head and try one of these straightforward fixes.
Correct the System’s Time and Date
Sometimes, the only reason why you are facing a ERR_TOO_MANY_REDIRECTS error is that the time and date of your system are either outdated or incorrect. So make sure to check this setting on your system and update the time/date properly.
To change the time and date on your system:
These steps should fix the date and time on your system. Try loading the website again and check if that was the actual issue.
Check Home/Site URLs
The Site/Home URLs is the address that your visitors enter in their browser to access your site. Home URL can also be used to refer to the Site Address (Site) tab under Settings>General in your WordPress.
The site URL is the location where you can find the site and its core files. This is also known as the WordPress Address (URL) on the settings page for WordPress single installs.
If both of these URLs are not set properly or if there is a typing mistake, then it could be the major cause of your redirect error. Check these two fields to make sure that they are correctly set and not pointing at a mismatched or wrong domain.
Typically both of these errors are the same. For instance, the addresses must not include a slash or have inconsistent structure. Both the addresses must have HTTP:// in the start unless an SSL certificate is installed. In the case of the SSL certificate, there should be https:// at the start.
Similarly, if any of the sites include www. in the front, this must also be included in the other address. In short, both of these URLs must mirror each other, so be sure to check them properly. However, if you are unable to access the settings page or have a Multisite network, you may still modify these addresses to ensure they are correct. For this, you will need to override the settings by entering values in the wp-config.php file.
You can access the wp-config.php at your WordPress site root and can also access it via SSH, FTP, or WP-CLI.
Redirect Pages by Disabling WordPress Plugins
Another quick way to eliminate this error is to temporarily disable all the WordPress plugins on your site. For instance, using plugins like Yoast SEO or Redirection, lets you execute redirects.
Oftentimes, the updates or settings of these plugins may also conflict with redirects which are already set on the server, creating a redirect loop. When you disable a plugin, it doesn’t harm any of your data. Most likely, you will not be able to access the admin, but you can login via SFTP to the server and rename the plugin folders into something like plugins_old. Once done, check your site if it’s up and running again.
If this solution works for you and your site is up again then test each of your plugins separately. Don’t forget to rename the plugin folder back to its original name ‘plugins’ and then rename every plugin folder inside this, separately, until you identify the problematic plugin.
As soon as you see the redirect message again, you can recognize that the last plugin you activated is the real culprit. Now you must check the settings to ensure that they are correct. Also, make sure you don’t enter a similar redirect twice since this will cause the error. However, if the problem is not fixed after changing the plugin settings, then you should contact a developer or try out the other fixes we discuss below.
Disable The .htaccess File
Another possibility of this redirect error can be the settings in your .htaccess file. Chances are that these changes are making your site enter into a redirect loop. In this scenario, simply disable the .htaccess file to restore your site’s access.
If the issue is not fixed by following these steps, then check the configuration of the .htaccess file. You can perform this by clicking on Edit option. If you don’t know about or are uncertain about its appearance, then try making use of the default .htaccess configuration.
All you need is to delete the contents of the .htaccess 1 file and paste the default configuration instead. Once you have completed this step, simply rename .htaccess 1 back to the original .htaccess.
Now, check if your site is working with the default configuration. If the problem is fixed now, you know that this error occurred due to the improper .htaccess configuration.
Since, there is a possibility that your site might stop working after these changes, make sure you keep a backup of the original .htaccess file. Also, if you replace any of your old .htaccess settings, chances are some of your plugins, permalinks, and settings may stop functioning.
Clear Browser Cookies on That Particular Site
When you are using web browsers like Mozilla Firefox or Google Chrome, right below the error message you may find a recommendation to clear your cookies. This is because your browser's cookies might contain some faulty data that may result in the ERR_TOO_MANY_REDIRECTS message. You can try this solution even if you are not encountering the error for your own site but also other websites.
Since cookies store your ‘logged in’ site’s status and some other settings, we simply recommend deleting your browser cookies on that specific site which cookies might be causing a problem. This will help you in accessing your specific site successfully.
If you are using the Google Chrome browser, go to Settings by clicking on the three dots that appear at the upper right-hand corner of the screen. Then, scroll down and go to ‘Advanced’ and then ‘Content Settings’. Click on Cookies and then ‘See all cookies and site data’.
Once you are done, look for the domain where you are facing the redirect error message. Next, simply delete the cookies that are currently stored in your system for that specific domain. Last, try to access the site again and check if the problem is resolved.
Clear Browser Cookies on That Particular Site
In addition to clearing the browser cookies of a particular site, you should also clear the server, proxy, and browser cache.
This is because redirect loops can also be cached. That is why you must clear the WordPress cache, 3rd party proxy services, and the server (including the browser) if needed.
Check Browser Extensions
One reason for facing the ERR_TOO_MANY_REDIRECTS could be an improper browser extension. Go to the extension manager that checks all the extensions that are installed on your current browser.
To check the extensions in Mozilla Firefox and Chrome, follow the following steps.
In Firefox, type ‘about.addons’ in the address bar and press Enter. Now, select Extensions. You can now see all of the Firefox extension here.
In Chrome, type in the address bar ‘chrome://extensions’ and press Enter. Now you can see all of the Chrome extensions, and you can easily enable/disable any or all of them from here.
Just like in the case of plugins, you can also disable all the extensions and then activate each one of them, one-by-one, to find the culprit extension. This will help you in specifically to identify the issue and to avoid the redirect error in the future.
Upgrade and Use Dedicated IP
The one user-friendly way to get to your site is the domain name. Your domain name is actually linked to the IP address where the site is hosted. As you enter the domain in the browser, it links to the site’s IP address and accesses your site from there. Generally, only a single site is linked to an IP address.
However, this connection or direct route can be broken if you host the network or your site through shared hosting. Another reason could be the installation of multiple sites by using only one IP address on the VPS.
When multiple sites share a single IP address, your browser faces difficulties and cannot be sure which site it’s supposed to access. Moreover, whenever you visit a site for the first time, the browser creates a cookie and includes the IP address for the site. So if you visit another site using the same IP address, the browser will locate the existing cookies for this IP and notice a different URL. Hence, it can't create a new cookie or issue the same one. Eventually, you will come across the redirect error because the browser will not be able to access the site.
That is why upgrading or using a dedicated IP address for each of your sites is the best solution. Otherwise, you can move on and check the other fixes to get rid of the redirect error.
Check 3rd Party Services
Another possible cause of the redirect error may be reverse-proxy services like Cloudflare. This happens when their Flexible SSL feature is enabled, and you also have the SSL certificate installed with the WordPress host. The reason for this is that, when flexible mode is chosen, the requests to the hosting server are sent over the HTTP.
Since the host server is likely to have a redirect in place (i.e. from HTTP to HTTPS), it causes a redirect loop. However, to solve the problem, you must modify the Cloudflare Crypto settings from from Flexible to either Full (strict) or Full.
You may use the 'Always Use HTTPS page' rule to simply redirect the users to HTTPS without establishing a loop. If you choose this rule, watch out for Cloudflare forwarding URL redirection rules. If the domain shows itself as the destination, be vigilant and avoid creating a loop. If you do this, this will cause infinite redirect errors on all the affected URLs, making this problem difficult to resolve.
There are many reasons you get a redirect error. In this guide, we have discussed the most frequent and common reasons. While it can be a frustrating experience to come across this error, again and again, this is indeed easy to fix.
Needless to say, when you develop a WordPress site, this is one of the most popular errors you may run into. Different web browsers display this redirect error message in different ways. Regardless of how these error messages are being displayed, all of them point towards one main issue— configuration issues in the WordPress settings that cause your site to enter into a redirection loop.
Thanks to the many possible solutions in this guide, we can now fix the ‘redirect loop’/ ‘too many redirects’ error in a timely manner.
Have you tried any of the above-discussed solutions to fix the issue? If yes and the problem was fixed, let us know in the comment section below.
Also, if you have already faced the redirect issue in the past by using another method not listed in this guide, please comment and let us know what you did to make the redirect loop error go away.