How to Fix Too Many Redirects Error in WordPress?
Sometimes, the WordPress website doesn’t open and shows an error that says too many redirects. If you are new, you will surely get confused thinking about what to do next. It’s always a hard thing to solve when you don’t know what to do.
However, that’s not the case here. You can solve too many redirects error in just a few clicks. In most cases, there is just a simple thing that you will need to change. If you change it, your website will start working as normal.
So, we will see how you can change it.
Overview of Too Many Redirects Error in WordPress
We will see the basic overview of too many redirects error. Here, we will see what is the main reason for this error. Thereafter, we will start solving the error.
The main reason you will see this error is because of the HTTPS.
By default, you will have set the protocol for your WordPress website. Remember, when you installed WordPress at first, it asked you for the protocol. You selected HTTP in it.
So, if someone opened HTTPS instead of HTTP then WordPress will automatically redirect the website to HTTP.
Now, the trouble begins when you install an SSL certificate. If you installed an SSL certificate, it will do the reverse.
So, if someone tries to open the website in HTTP, it will redirect the website to HTTPS.
Both of these will contradict each other. As a result, you will get an error that says too many redirects. The request will just go from HTTPS to HTTP and vice versa. No website will be displayed as WordPress and the SSL will continue to redirect the website to each other. This is a big problem and you won’t see the website.
To solve this, we will change the protocol of WordPress. Once we do it, the website will work as normal.
The same error can also be caused by the redirection plugin. We will see all these things in-depth as we move on to the article. In other words, we will see a couple of methods to solve this error. You can use any of the solutions as per your requirements. Depending on which applies to you, you should try only one. You can surely check all the websites to see which one is working for you.
Fix Too Many Redirects Error in WordPress
Now, let’s get into the solution to the error. Here, we will see how to fix Too Many Redirects Error in WordPress. Unlike most of the methods, here you don’t necessarily need to take a backup of your website. We won’t change many things in the first method. Therefore, there is nothing to worry about here.
However, if you want to implement the second method, you can surely take the backup of the website. We will tell you as we move on. It’s not a mandatory thing. However, if you want safety, you can surely take the backup before we continue.
Change the Protocol
The first method is where we will change the protocol of the website. It’s easy to change the protocol of the website.
All you have to do is open the wp-admin dashboard. Don’t worry, you can open the dashboard even if you see the error. The error won’t apply to the admin side. So, you can directly open the admin panel.
Inside it, you will have to head over to the settings menu. Inside the settings, open the general tab.
Now, you will see the URL of the website and WordPress URL fields.
You will notice that there is HTTP written in both the place. So, you will need to change the HTTP to HTTPS.
Just save the changes that you made and that’s it. Now, you can reload the website and see if the changes are made or not.
In most cases, it will be done and you can continue using the website. Some people won’t be able to open the admin panel too. So, here is the solution for it.
Change HTTP to HTTPS from Database
Now, if you are not able to open the admin panel too, here is the solution for you. You can follow this method to solve the issue.
We will see how you can change the website URL from the admin panel. In this way, you can solve the error without logging in to the admin panel. So, here is the method for the same.
- Open your cPanel and head over to the PHPMyAdmin option. You will find it in the cPanel itself
- Now, find your WordPress database. There will be a list of databases from which you will have to choose. You can choose your WordPress website’s database and continue
- Find the table called “wp_options”. There might be a prefix depending on the name of the database. You just need to find the options table.
- Inside it, you will see the field for the website URL.
- You can hit the edit button give on the left side and then click on it.
- Change the site URL from HTTP to HTTPS. That’s pretty much it. Your website’s URL is now changed
- You can save changes and see if your website is loading back again or not.
Don’t forget to save the changes. You can take a backup of the database before doing this. You can go to the Operations tab and then you can select the export button from there. It will save the database.
The next issue can also be because of the redirection plugin. If you are using any plugin that can redirect the website URL, you will need to check that plugin.
If the too many redirects error is only on a particular page, then the issue might be because f the redirection plugin.
Therefore, you need to check out the plugin. Further, you also need to see if there is more than one redirection plugin. If there are more than one plugins, it will be causing the issue.
The two plugins usually contradict each other. As a result, it will give you the error.
For example, if one redirection plugin is redirecting the post from www.example.com/post-1 to www.example.com/post-1-updated. now, if the second plugin is doing vice versa, it will cause the error.
Therefore, it is necessary to know that you should never use two plugins at once. This applies everywhere including security plugins and cache plugins.
Moving on to the next, if this method didn’t solve the error, you can try the next one.
SSL Certificate and Plugins
If you are using an SSL certificate for your website, you need to make sure that the SSL is not expired. If the SSL is expired, you will have to make sure that you renew it.
You can check out the SSL expiry date.
The next thing you can do is to check the SSL plugin. If you are using the SSL plugin, you need to make sure that it is configured correctly. If the plugin is not configured, you need to recheck it. That might cause an error. Therefore, you must configure the plugin properly. Spend some time checking the plugin to make sure that it is working perfectly.
The same applies to the CDN and the plugin. If you are using Cloudflare or any plugin, make sure everything is configured. For Cloudflare users, you can also try changing the SSL type from full to flexible. Changing the SSL type from full to Flexible will make sure that the website doesn’t load all the things in SSL.
This happens when a script is only capable of working in HTTP. Now, if the CDN is set to the full. In that case, you might see the continued redirect loop. The script will force HTTP and the SSL/CDN will be forcing the HTTPS. Ultimately, you will see the error in the end. Therefore, you need to make sure that you are not making the same mistake here. Make sure the plugins are properly configured. Further, you also need to make sure that the SSL/CDN is properly configured. Most people will be using a plugin for the same.
To conclude, these are the methods you can use to fix Too Many Redirects Error in the WordPress website. The error is also called a redirect loop. If you are making changes in the database, then it is recommended to back up the database.
Also, if you are thinking one of the plugins is giving an issue, it is highly recommended to deactivate that plugin instead of deleting it. If you delete the plugin, the data will disappear. However, if you deactivate the plugin, the data will remain the same. If you are using a redirect plugin, it will have a lot of data that you surely don’t want to lose. Therefore, you can deactivate the plugin. You can also take a backup of your website before making the changes. This will make sure that the data is safe.
WORDPRESS WEBSITE BROKEN? WordPress Emergency Service
Stop wasting your time we will fix your website today!