Err_too_many_redirects is also known as redirect loop and it’s one of the most commonly occurred errors in WordPress.
This error means your website is stuck in a loop of redirects and it’s going back and forth from one page to another. This error is displayed to visitors when you have too many repetitive redirects.
Although, this error is not only for WordPress websites and can occur for other websites as well, Changing settings in your host, theme, and plugins can cause this issue as well.
Why do I see err_too_many_redirects?
Although, we don’t really know the main reason that causes this error, usually, changing WordPress and plugin settings can cause it. Also, if your theme is not compatible with one or a number of your plugins, it may cause conflicts, resulting in redirection error.
In reality, the website will redirect your browser countless times and your browser will finally display this error after a few minutes of being in the loop. Unlike other errors, err_too_many_redirects won’t get fixed on its own. However, solving it can be quite simple.
How to Fix err_too_many_redirects error in WordPress?
To fix the err_too_many_redirects error, you will have to review a few possibilities. follow these steps:
The first step to take is to delete your browser’s cache and cookie. Having old information stored in your cache and cookie can cause err_too_many_redirects.
Deleting cache and cookies can solve the problem. However, you may see the error next time ’round. Therefore, you have to set your browser to automatically delete cookies after every visit.
To delete cookies on Google Chrome, simply click on the 3 dots in the top right corner and head over to settings. Then click on “Advanced” at the bottom of the page. In the “Privacy and security” section look for “Clear browsing data” then click on it. Then tick cookies and cache, then click on “Clear data”.
To delete cookies in Firefox, in the top right corner click on the 3 columns and click on “Options” then go to “Privacy & Security” tab and from the “Cookies and Site Data” click on “Clear Data”.
2. Delete WordPress cache
Optimizing cache through plugin is a greatway to increase the speed of your website. However, the cache can cause err_too_many_redirects error. In some cases, you can still log in to your WordPress dashboard.
Enter your dashboard and head over to settings and click on WP super cache and then click on delete cache.
Deleting cache in WP Super Cache, WP Rocket and W3 Total is exactly the same. If you are using CDNs make sure you delete their cache and temporarily disable them.
4. Review .htaccess file
If you are using Apache web server, it’s recommended to review your .htaccess file. By modifying this file, you could break your website and see the err_too_many_redirects error.
To fix this issue, enter your website/host with FTP or SSH and rename .htaccess to .htaccess_old.
By doing this, you have essentially created a copy of your old .htaccess file. To recreate .htaccess simply head over to your permalinks and click on save.
If you can’t enter the dashboard, recreate your .htaccess file manually and copy and paste the information below to it:
# 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
After pasting this, finally click on save and upload the file to your server.
4. Fix plugin conflicts
If you still see err_too_many_redirects error, then it is possible that one or some of your plugins are causing this error.
As mentioned above, your theme may not be compatible with one or a few of your plugins and cause the redirects to occur. There are many redirect plugins that are not compatible with your web server’s redirect rule. One simple fix is to disable your recently updated and/or installed plugins.
If you don’t use any newly installed or updated plugins, then simply rename your plugins folder to plugins_disabled.
Once you’ve renamed your plugins folder try to access your website again. If you still see the err_too_many_redirects error then your plugins are working fine and they are not the root of this issue. However, if you don’t see the error then it means, one or some of your plugins are causing this error.
To find out which plugins are causing the error you will have to simply rename their folder one by one and test if you see the error or not.
5. Fix HTTPS connection
This error can also be caused by the wrong settings in HTTPS. If you are using Apache web server, you can redirect your traffic from HTTPS to HTTP. To do so, simply copy and paste the code below to your .htaccess file:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301],
Keep in mind, this code only works for Apache web server. If you are using another server like Nginx, You could copy the code below to your Nginx settings:
server { listen 80; server_name domain.com www.domain.com; return 301 https://domain.com$request_uri; }
You are probably using way too many HTTPS redirects. Simply use “Patrick Sexton’s Redirect mapper” to review your website and see how many redirects you are using.
6. Revise your WordPress settings
To review your WordPress’ settings you need to enter your dashboard and head over to “Settings”. Make sure your URL and other information are correct.
URL should be something like http://mydomain.com (make sure your domain replaces “mydomain.com”) If everything looks correct, click on save.
It is possible that your website’s domain is set to WWW, if that’s the case then add WWW to your URL. For example, http://www.mydomain.com and also change your WordPress URL in the settings.
If err_too_many_redirects is preventing you from entering your WordPress dashboard, you can make these changes to the wp-config.php file.
Head over to your WordPress directory on your server (home/user/public_html/wp-config.php). Open it and find the lines below:
define('WP_HOME','http://mydomain.com');
define('WP_SITEURL','http://mydomain.com');
If your server is set to run on WWW, simply add “WWW” to your URL. (Again, make sure you change “mydomain.com” to your domain’s name)
Once you have made these changes, make sure you save your file and see if the error disappeared or not.
Conclusion
Err_too_many_redirects error is one of the most commonly occurred errors in WordPress. The main reason behind it is unclear and it usually occurs due to simple mistakes caused by the users. However, troubleshooting it can be very simple and fast. We hope we helped you solve this error.