How to Fix Too Many Redirects Error on Your Web Browser
You’ve found yourself in redirect loop? I.e. instead of a specific page of the website loading you’re blocked with a too many redirects error that just keeps stubbornly reappearing and breaking your website? We have some suggestions to find the root of it and fix this issue.
The reason for this bothersome error is ultimately just like it sounds - there’s something that’s making your website have too many redirects and causing it to become stuck like that. The 1st URL a user is trying to reach points to a different URL, and that one points back to the 1st one, and-so-forth. The browser is confused about the address it should go to, or cannot reach it, because that domain points to a different or many other places.
For protection, a browser is able to cope with 20, sometimes less, redirects at one go. Once it’s more than that - it detects a problem and the error message appears. Thanks to this, the loop gets paused, and you can try to fix the error. This might as well be an issue at the user end, in that case they'll clear the cache and cookies and maybe will be good to go, but it's more complicated and cruical to get rid of any misconfigurations on the server side.
Err too many redirects is often a result of two competing redirects, one being SSL (https), and other sending back to the non-SSL http, or a similar rivalry between www and non-www domains. The root is mostly some type of a misconfiguration in redirection tools you've used.
Reasons for redirect error might be:
- there's a custom configuration in the code that's conflicting with .htaccess file;
- site URLs are incorrect/ different;
- there's a misconfiguration in recently installed plugin;
- your network has a new site with the same exact URL as deleted site;
- you've set a redirect somewhere that is either creating a loop, or repeating itself.
Keep in mind these frequent issues, and proceed with fixing too many redirects on your website.
One solution might be to simply identify the redirects that are causing your website to loop, which can be done with any redirect-checker tool. Navigate to that, type in your URL, select the option to analyze, and pinpoint those redirects that redirect back to themselves. Depending on the type of platform you use, change these specific redirects, and run a test to see if they're now working as they should.
A very common misconfiguration is having different URLs in Address and Site Address settings. Let's paint a picture. The URL for your site is www.yoursite.com, you then go to Settings and set it to yoursite.com. If you've previously selected to add www prefix (you probably had a choice to do that), then removing it in the General Settings is going to cause the redirect error. Same goes the other way around - if you've chosen to use your domain without www, attaching it will result in err too many redirects, as the user will be redirected from one to the other, and then back to the first one. What's left to do is go to Settings, and compare the two URLs - if they're different, change one for them to match.
If these two solutions are no help, there might be a plugin issue with your website. Do you recall installing a new plugin or updating an old one around that time that the error appeared? If so, go to wp-content/plugins/ to deactivate and completely delete that plugin's folder.
In case you are not sure about which plugin is causing issues, deactivate all of them. Then download the .htaccess file for backup from your website's root directory using FTP, and delete it from the server. Try accessing your site now, it'll create a new .htaccess file. Since there are zero plugins activated, the problem will probably be fixed, and you'll be certain it was a plugin causing it. To remove the correct one, re-install all of the plugins you had and activate them one at a time, and test your website for errors. Hopefully you'll find which of the plugins was the reason behind the redirect loop error.
Need additional help handling and fixing your websites redirects? Perhaps you're planning on migrating your website and could use expert guidance? Check out our Magento migration services, or chat with us directly by clicking the orange bubble to your right!