What is ERR_TOO_MANY_REDIRECTS?
If you are a website administrator and responsible for managing website you will encounter many different types of errors. ERR_TOO_MANY_REDIRECTS is one of them that confuses many administrators and users. Troubleshooting err_too_many_redirects is not always easy. The ERR_TOO_MANY_REDIRECTS means the website keeps redirecting between different addresses like, www to non-www or HTTP to HTTPS.
This type of error usually occurs in WordPress and Magento CMS as they use a base_url or URL type configuration within the site. This error is also known as the 310 error or 404 page not found. In simple terms, the ERR_TOO_MANY_REDIRECTS means the web browser does not know where it is supposed to go or cannot reach your site.
Basic Reasons for ERR_TOO_MANY_REDIRECTS
Usually, the reason for ERR_TOO_MANY_REDIRECTS is an incorrectly configured redirects or problems with domain mapping. The most common issues that cause a redirect error are listed below:
- Multiple websites are hosted on a single IP address.
- Incorrect .htaccess file.
- Incorrectly configured WordPress settings.
- Conflict with plugins.
- CDN caching problem.
In this tutorial, we will explain what causes err_too_many_redirects and how troubleshooting it.
Clear Browser Cache
Sometimes, corrupted or outdated cookies can cause the ERR_TOO_MANY_REDIRECTS error. So it is a good idea to clear your website cookies stored on your browser before making any changes to your site.
To troubleshooting err_too_many_redirects error, you can clear all cookies by deleting your browser history by following the below steps:
Clear Cache on Chrome
1. Open the Chrome browser and click on the three small dots on the upper right corner as shown below:
2. Click on the Settings. You should see the following screen:
3. Scroll down and click on Advanced. You should see the following screen:
4. Click on the Clear Browsing Data. You should see the following screen:
5. Click on the Clear data to clear your browser history and cache.
Clear Cache on Mozilla Firefox
1. Open the Mozilla Firefox browser and click on the upper right menu button as shown below:
2. Click on the preferences. You should see the following screen:
3. Click on the Privacy. You should see the following screen:
4. Click on the Remove All button to clear your browser cache.
Now, try to access your website and check whether it is functioning properly or not. If your website is still not working, you can proceed to the next step.
Check URL Settings of your WordPress
The most common reasons for redirect loop error is your WordPress home URL and website URL do not match. So for troubleshooting err_too_many_redirects, it is a good idea to check whether your WordPress URL settings are configured correctly.
To fix this, log in to your WordPress admin dashboard and click on the settings tab. You should see the following screen:
In the General Settings page, check your WordPress Address (URL) and Site Address (URL).
Make sure both URLs are configured properly.
Note : don’t leave a trailing slash at the end of your URL like http://www.your-domain.com/
If you don’t have permission to access the WordPress admin dashboard, you can define this setting by editing wp-config.php file.
Connect your website with an FTP client, open the wp-config.php file and add the following lines:
define('WP_HOME','http://your-domain.com'); define('WP_SITEURL','http://your-domain.com');
Save the file and try to access your WordPress site. If you got any error then try to add your domain with the www prefix.
Disable The .htaccess File
Sometimes, the .htaccess file can also cause your website goes into a loop of redirection.
You can rename the .htaccess file to fix the issue.
Follow the below steps to disable the .htaccess file:
1. Open the File Manager using your control panel.
2. Find your .htaccess file.
3. Right-click on the .htaccess file and rename it to a different name.
Now, try to check your website whether it is working or not. If it works correctly, then you will need to edit the .htaccess file and add the default configuration as shown below:
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>
Save and close the file when you are finished. This method will help you to fix the problem immediately.
Disable Corrupted Plugins
Sometimes, corrupted or outdated plugins can also cause err_too_many_redirects error. You can try to disable them to fix the issue.
1. Open the File Manager using your control panel.
2. Locate the Plugins directory and rename it as shown below.
3. Now, try to check your website. If it is working properly that means one or more plugins on your website were outdated.
In this case, find the plugin that causes the error by renaming them one-by-one. Once you are finished, remove the outdated plugins and remove the folder back to Plugins.
Delete WordPress Cache
In some cases, the WordPress cache also causes the err_too_many_redirects error. You can resolve this by deleting the WordPress cache.
You can delete the WordPress cache by following the below steps:
1. Login to your WordPress admin dashboard and click on the Plugins >> Add New. You should see the following screen:
2. Search for Super Cache and click on Install Now >> Activate button to setup the plugin.
3. Click on the Super Cache option under Settings as shown below:
4. Click on the Delete Cache button to delete the WordPress cache.
Now, try to check your website whether it is working or not.
Clear Proxy Cache
If you are using reverse proxy services like Cloudflare CDN then you will need to clear the Cloudflare cache to resolve this error.
You can follow the below steps to clear the Cloudflare cache:
1. Login to your Cloudflare dashboard. You should see the following screen:
2. Click on the Purge Cache. You should see the following screen:
Click on the Purge Everything button to clear the Cloudflare cache.
Next, try to check your website whether it is loading properly.
Conclusion
In this guide, you learned several methods to fix the err_too_many_redirects error. I hope this will helps you to resolve your error. It is recommended to take a backup of your website before following any of the above steps.