Creating a website on WordPress has a huge number of benefits. However, at times you may save several errors that might irritate. Few of the common errors that are frequently experienced by WordPress users include internal errors, white screen of death, etc. Apart from these, there are various other errors as well which can create trouble for the users. One such error is ‘Too Many Redirects error. This error may appear from time to time while you are trying to view a website.
Table of content
What is the Too Many Redirects error?
The Too Many Redirects error prevents your website viewers from viewing the content of your WordPress website. It is quite a common error and stops your website from being redirected. In case you are facing this error, you need not worry as there are a lot of solutions to this problem.
Also Read: Online Fundraising Plugin
What are the causes of the Too Many Redirects Error in WordPress?
The Too Many Redirects many occur because of misconfigured redirection issues. WordPress is one such platform which uses the redirect function. You will also find a lot of other WordPress plugins that use this redirect functionality. Some of these plugins include WordPress SEO plugins, SSL plugins and cache plugins.
Because of this misconfiguration in the redirection, your website may be redirected to a particular URL which will again redirect the website back to the same URL. In this way, a continuous loop will occur and the browser will get stuck between two pages. As a result, the Too Many Redirects error will occur and you will not be able to view the pages of your website.
How to fix the Too Many Redirects error?
The misconfiguration error mainly occurs when the user enters an incorrect URL in your WordPress Address URL field or in the Site Address URL settings. Let us say that your website URL is http://www.abc.com. You navigate to the Settings option and then go to the General tab and set the URL to http://abc.com.
There are a lot of web hosts that allow you to select whether you want to add the www prefix to the domain name or you wish to go without it. Suppose you have selected to add the www to your URL. Now if you do not add the www to your WordPress site settings, then this will cause an error. If you have chosen to use your domain without the prefix, then you will have to type it without the domain name. In such a case, you will be redirected by the server configuration and once again, you will be redirected to the same URL causing an endless number of redirects.
If you have not made any changes to the Settings option, then you must get in touch with your web host as the problem might be on their end. However, if your web hosting provider is not a reliable one then they might deny having any such issues. In that case, you will have to switch your web host or fix the error all by yourself. Go to the Settings option and click on General settings and change your WordPress site address.
How to change the site URL without having to access the admin area?
Sometimes it may so happen that you do not have any access to the WordPress admin area. You will still be able to update the settings. This can be done by defining the settings in the wp-config.php file. For that, all you need to do is connect your website by means of an FTP client. As soon as your website gets connected, you will be able to locate the wp-config.php file in the website’s root directory. You will have to download the file using Notepad or any other text editors. Al you need to do is add the following line and you are sorted:
- Save the file and once again upload it to the webserver.
- Delete website cookies
Sometimes, corrupt and outdated cookies can also cause the Too Many Redirects error. So, you have to clean your websites by removing all the cookies that have been stored on your browser. The cookies can easily be cleared by navigating to the settings option and clearing the browser history. If you wish to keep some cookies related to a few of the websites, then you need to delete only the cookies of specific websites.
Clear WordPress Cache
It is also quite possible that you are not able to access the website admin area even after removing your cookies. In that case, you need to delete the website cache. A number of WordPress caching plugins are available using which you can easily remove all the cache.
Deactivate faulty plugins
Too Many Redirects error can also occur if you have a faulty plugin installed on your website. To get rid of the error, you need to disable that particular plugin. Firstly, you need to find out which plugin is actually causing the error. For that, you need to deactivate all the plugins.
After that, you will have to use FTP in order to download the .htaccess. The .htaccess file is present in the root directory of your website. Once the file has been successfully downloaded, you can delete it from the server. Next, you need to find out which plugin is causing the error and for that, you have to download fresh copies of all the plugins. Activate one plugin at one go and then browse through the pages. In that way, you will be able to isolate the defective plugin.
Disable the .htaccess file
Any error in the .htaccess file may also cause your website to go into a redirection loop. To troubleshoot that, you will have to disable that file and regain access to your website. Navigate to the File Manager option using the control panel. Look for the .htaccess file and rename it to .htaccess_disabled. Now see whether your website is properly loading. If this method works for you, then you will have to check the configuration of the file by right-clicking on it. Delete the content and paste the original data in it. Your problem will be fixed.
So, these are the ways by which you will be able to fix the Too Many Redirects error. If you know of any other way to troubleshoot this error, then don’t forget to let us know of it.