It is likely that while browsing the internet or even on your own website, you may have encountered an ERR_TOO_MANY_REDIRECTS message indicating that there are too many redirects to complete the connection. The error usually looks like this:
This happens because the site redirects you too many times. When redirects occur in a loop, the browser or web server will attempt to break the loop and return an error page. A loop means you try to go to A, where A sends you to B, but B sends you back to A again, and so on.
This happens because somewhere in your code, files, or configurations there is more than one redirect command conflicting with each other. A common mistake is a redirect from
www.example.com to example.com, but elsewhere it states the opposite. This will create a redirect loop.
An HTTP to HTTPS loop, or vice versa, is also very common.
AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace
How to fix the ERR_TOO_MANY_REDIRECTS error?
As mentioned initially, this error is due to your website’s configuration/code, so there may be several sections or files generating the issue.
Clear browser cookies and cache
One reason this error may appear is that your browser cache and cookies store old redirects, which can generate the redirect loop. In this case, you only need to access your browser settings and clear its cookies and cache.
Disable plugins
A redirect loop may be the result of an active plugin on your site. If you cannot access your CMS administrator panel, you can disable plugins via FTP or SSH:
If disabling your website plugins makes the site load properly, it means the loop was caused by one of the installed plugins. It is recommended to leave that plugin disabled and look for an alternative.
Database redirects
If there is an error in the URL assigned in the database, it may generate the error when trying to access the other address, causing the previously mentioned loop. You can edit the URL configuration through your hosting database:
As with other possible errors, the process varies depending on the CMS installed. Below are guides on how to modify the associated domain in WordPress and Prestashop from the database:
.htaccess file
You can also check the .htaccess file in your website directory.
The .htaccess file controls page redirects, so a small issue in this file may cause a redirect loop error when loading your page if it is not configured correctly.
We do not recommend deleting the .htaccess file directly, but rather replacing it with a default .htaccess file to verify whether the original file is the source of the error.
If you are using WordPress, it is possible that if your wp-config.php is not properly configured, the error may be there. You only need to verify that one or both of the following lines are not present:
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
Temporarily disable the Content Delivery Network (CDN)
Another possible cause of a redirect loop error is a third-party service installed on your hosting. In most cases, this relates to CDN configuration. A CDN is a network of proxy servers located in different places to ensure high website loading speed.
The redirect loop issue arises when your CDN has the SSL option set to Flexible, which means it sends unencrypted requests to your website server.
If your website is configured to redirect all HTTP requests to HTTPS while using flexible mode, a redirect loop problem will occur.
If that is the case, configuring the CDN SSL settings to Full should resolve the issue if you have an active SSL certificate.