WordPress is a brilliant tool for many to use but that does not stop it occasionally throwing up errors. If you are running a self-hosted WordPress site, you need to make sure that you know how to solve some of these common errors. One of the most commonly occurring errors is the WordPress “Too Many Redirects” error. Trying to fix this can be a little stressful if you are a new user. Let’s go through some of the steps you should take if you need to fix this error on your site.
What is the ‘Too Many Redirects’ Error?
A user is going to see this error when they attempt to access the page. The error message varies depending on the browser used but it will basically inform the user that the redirect request for this site cannot be fulfilled.
This is usually down to a problem with the redirection protocols of the site. WordPress allows you to very easily build a site based around the other plug-ins. Several of these plug-ins will have their own redirect functions and these can cause conflicts. A conflict can also occur as the WordPress SSL and caches also have their own redirects.
The danger here is that a user could end up trapped in a loop of redirects which have no end. When this happens, the browser will actually end up stuck between two pages with no way out. By resolving the redirect error, they won’t get trapped in this way. Let’s take a look at how to fix WordPress “too many redirect” issues.
Check the URL
Two important settings which could cause this issue are the WordPress Address URL and the Site Address URL, both of which can be accessed from the General Settings. When setting up your site, you will have the choice as to whether you want to use the “www” prefix on your site name or whether you want your URL to read “https://sitename.com”.
When adjusting the URL settings, you need to make sure you enter the URL as it actually is. If you don’t have the www prefix, setting one of the URLs to this is going to cause the error as you are asking the browser to direct to a site which doesn’t exist. They will then be trapped in the redirection loop. The same thing might also happen if you leave an extra slash at the end of your domain when you don’t have one.
If you know that you were not the one to make these changes then you need to find out why they changed. The culprit might be with your web host; make sure you contact them to lodge an enquiry. They might have a configuration issue they are currently not aware of.
No Admin Access? No Problem
Can you not access your WordPress Admin area? Whether you have found yourself trapped in the redirect loop or you have other issues which are keeping you out you can still access your URL settings to make the changes you need.
This can be done by updating the wp-config.php file for your website. You can download this file from your site’s root directory using an FTP client. You can then edit it using a program like Notepad. You will need to add the following lines to the code:
Don’t forget to replace “sitename” with your actual site name, or the URL you want to use. When the edits have been made, save the final and upload it back to your web server. If the site still can’t be accessed, it might be worth trying to see if you can get it to work by adding the “www” prefix.
Problems with Plugins
While altering your URLs can often fix the issue as it occurs, the error can still persist. If this is the case for you, the problem can often lie with your plugins. Since these are frequently developed by a third party, they can introduce errors with redirection that can be difficult to diagnose.
If you think it might be a plugin causing the issue then you need to think about some of the actions you have undertaken recently. Have you updated the existing plugins recently or installed a new one? Did the error appear shortly after? Chances are it is indeed the plugins.
If you know which one it is, all you need to do is remove it from wp-content/plugins/. Not knowing which plugin is causing the error will require a little more detective work. The easiest way to work out which one it is to deactivate all of your active plugins. Download the .htaccess file from your server to serve as a backup and then delete the original. A new file will be generated by the server; hopefully clearing the error.
You then need to find the plugin which has caused the error. Download the latest versions of each of your plugins and activate them one by one. In between, test your website across different browsers to make sure that everything is working. If you still encounter an error, you can be certain that this plugin is the one which is causing an issue. Delete it and start to source a replacement.
Trial and Error
The “Too Many Redirects” error can be incredibly frustrating for users and site owners both. You need to make sure that you are able to fix it. By following the steps above, you should be able to fix this specific error.
Plugins can often cause glitches and it is frustrating as they are often so useful for our sites. You need to make sure that you are able to deal with these glitches whenever they occur. It could be an easy fix like the ones above or it could be more involved.
You also need to make sure that you can set up your site correctly to avoid issues like the redirection error. Watch out when filling out things like the URL setting; the smallest inconsistency could cause an error. With a little careful preparation and knowledge of how to fix the issue, you should be able to fix any issue on your WordPress site.