Methods to solve redirects issue in wordpress
WordPress is a pretty stable and reliable content management system (CMS) with an incredibly strong core programming backing this platform. It offers you the best WordPress plugins and hordes of amazing WordPress themes and functions smoothly almost all the time. However, you may face some issues or errors in WordPress at times, mostly due to external factors.
One such most common error on WordPress that you are likely to face is the -’ERR_TOO_MANY_REDIRECTS error.’ In most cases, this error usually means there’s some misconfiguration in your WordPress settings, mostly caused by a WordPress plugin.
This makes the website go into an uncontrollable redirection loop from one page to another. In Google Chrome, it is displayed as “This webpage has a redirect loop error.” In Firefox it shows up as “The page isn’t redirecting properly.”
What Is This “Too Many Redirects Issue” Error In WordPress?
WordPress is the best CMS allows the URL redirection function, and many people use this function to redirect the new URL in place of the old one. The error occurs due to improper or misconfigured use of the URL redirects. Another stronger reason is the misconfiguration of an active redirect plugin being used in WordPress.
When this issue occurs, users face a loop where the site keeps redirecting them to a URL that is, in turn, redirecting them back to the referring URL. This puts the user’s browser in a trap between two pages, and so you see this error. This affects traffic and leads to a higher bounce rate.
Few Common Causes Of “Too Many Redirects Issue” Error
- You have entered an incorrect Home URL and Site URL in your WordPress settings.
- Too many websites hosted on a single IP address can cause this issue.
- Use of plugins with wrong configurations can also cause a wrong redirect of the page.
- A recent but wrong change made to the .htaccess file in WordPress can cause the redirect error.
Methods To Fix The “Too Many Redirects Issue” Error In WordPress
1.Check The URL Settings
Access the WordPress admin area and Go to ‘Settings’ and click on the ‘General Settings tab.’ Check the site’s URL address and WordPress URL address in the settings.
Now, while purchasing a domain, if you have opted for one ‘without a www’ prefix, then adding ‘www’ “https://www.myexample.com“ in your WordPress settings will cause an error. Likewise, if you have selected a ‘www’ prefix, then not adding the selected prefix will cause this error. So to fix the error, you have to either remove or add the prefix as necessary and then click on the ‘Save Changes’ tab.
2.Changing URL Settings Manually Via FTP
If you have no direct access to the WordPress admin area, then you need to use the ‘File Manager’ for access. You can easily change the URL settings with the help of ‘wp-config.php file’ that is the core file in WordPress. You can get direct access to the file manager through the hosting panel. Here, locate the wp-config.php file and edit the file using the FTP Client.
The root access of this file wp-config.php must be – /public_html/wp-config.php or /public_html/subdomain/wp-config.php. Download the file and add the below-written lines to this file.
You need to replace example.com with your site domain. Once done, save the file and upload it back to the server. Now, check if the error is fixed or not.
If a plugin is outdated or it is not functioning properly, then temporary disabling them will help to solve the error in no time. To do this, you need to simply access the ‘File Manager’ and locate the ‘WP-content folder’ icon. Find the plugins folder and rename it. You need to rename the said folder to plugins_backup. Save the changes made and try to check your website.
If the error is fixed, it means that one or more plugins on your website were outdated. As such, rename the plugins one-by-one until you locate the one causing the error or try removing the recently activated plugins. This will help fix the error and once done, don’t forget to rename your folder back to Plugins.
4.Disable The .htaccess File
At times, .htaccess file can also cause redirection error. In this case, you need to disable your file to get back access to your website. Access the file from the ‘File Manager’ folder. Select the .htaccess file and then right click on rename option. You can rename your file to anything or simply add a number to the file like .htaccess file and then click on the save option.
Check if your website loads properly. You can also restore this file by taking the backup and deleting the current version. Get direct access to the new .htaccess file by logging into your WordPress account. The file is generated automatically, and your website should work fine in this case.
5. Make Use Of PHPMyAdmin
The problem of too many redirects can also be solved by making a change to your database. You need to use the PHPMyAdmin that is also a tool for MySQL database. You need to login to Cpanel and then choose Databases > phpMyAdmin. Once you enter the interface, you need to add the said command to the MySQL tab.
UPDATE wp_options SET option_value = ‘HTTP: //example.com’ WHERE option_name IN (‘home’, ‘siteurl’);
Replace example.com with your site domain. Then, check if you can access the page properly.
It’s a matter of finding out what caused “too many redirects” or “redirect loop” error. Once you know the reason, you can quickly fix the website. But if you still can’t figure it out – you can make use of the methods mentioned above that will help you fix it easily.
About the author
Nirav Dave is the CTO & Co-Founder at Capsicum Mediaworks, a digital agency based out of Mumbai, India that specializes in all things Web Design & WordPress. He Worships WordPress and Loves to read anything and everything about this exceptional CMS.