The ERR_TOO_MANY_REDIRECTS error, also known as a “redirect loop,” occurs when your website gets stuck in an endless loop of redirects. This typically happens when your WordPress settings or server configurations cause URLs to redirect incorrectly, resulting in the browser being unable to load the site.
This error can be frustrating for both website owners and visitors, but the good news is that it’s usually easy to fix once you identify the underlying cause. In this article, we’ll cover nine methods to resolve the ERR_TOO_MANY_REDIRECTS error in WordPress.
Contents
- 1 1. Clear Browser Cookies and Cache
- 2 2. Check Your WordPress URL Settings
- 3 3. Disable WordPress Plugins
- 4 4. Check .htaccess File for Redirect Loops
- 5 5. Disable SSL Temporarily
- 6 6. Check for Hosting or Server-Level Redirects
- 7 7. Clear WordPress Cache
- 8 8. Set Correct Cloudflare SSL Settings
- 9 9. Check Database for URL Mismatches
- 10 To Sum Up
1. Clear Browser Cookies and Cache
Before diving into more advanced solutions, it’s always a good idea to start with the basics—clearing your browser cookies and cache. Sometimes, outdated cookies or cached data can cause a redirect loop, especially if you’ve recently made changes to your website’s URLs or settings.
Here’s how to clear cookies and cache:
- Google Chrome: Go to Settings > Privacy and Security > Clear Browsing Data. Check the boxes for “Cookies and other site data” and “Cached images and files,” then click “Clear Data.”
- Firefox: Navigate to Settings > Privacy & Security > Cookies and Site Data, then click “Clear Data.”
- Safari: Open Preferences > Privacy > Manage Website Data, and then click “Remove All.”
After clearing your cache and cookies, refresh the page and see if the issue is resolved. If the error persists, proceed to the following methods.
Learn: How To Improve Your WordPress Website Security
2. Check Your WordPress URL Settings
One of the most common causes of the ERR_TOO_MANY_REDIRECTS error is incorrect URL settings in WordPress. If the WordPress Address (URL) and Site Address (URL) settings don’t match correctly, it can lead to redirect loops.
Here’s how to fix it:
- Log in to your WordPress Dashboard.
- Go to Settings > General.
- Ensure that both the WordPress Address (URL) and Site Address (URL) are the same and start with either http://or https://, depending on your SSL configuration.
For example, if your site has SSL enabled, both URLs should start with https://. If SSL isn’t enabled, they should start with http://.
If you can’t access your WordPress dashboard due to the error, you can manually update the URL settings through wp-config.php:
- Access your website via an FTP client or your hosting control panel’s file manager.
- Locate and edit the wp-config.php file.
- Add the following lines, replacing your domain with the correct URL:
define('WP_HOME', 'https://yourdomain.com');
define('WP_SITEURL', 'https://yourdomain.com'); - Save the file and check if the issue is resolved.
3. Disable WordPress Plugins
Sometimes, WordPress plugins can cause the ERR_TOO_MANY_REDIRECTS error, especially if they involve redirects or caching. A plugin conflict, particularly among SEO, security, or redirection plugins, could be the culprit.
To diagnose the issue, follow these steps:
- Disable all plugins: Log in to your WordPress dashboard and navigate to Plugins > Installed Plugins. Select all plugins, choose “Deactivate” from the bulk action dropdown, and click “Apply.”
- Check your site: After deactivating all plugins, check if the error persists. If the site loads properly, one of your plugins is causing the issue.
- Reactivate plugins one by one: Reactivate each plugin one at a time and check the site after each activation to pinpoint the conflicting plugin.
If you can’t access your dashboard due to the error, disable the plugins via FTP or your hosting file manager:
- Use FTP to access your site’s /wp-content/ folder.
- Rename the plugins folder to something like plugins_old.
- Check if the site is working. If it is, rename the folder back to plugins and start reactivating plugins one by one.
Learn: Steps To Find Correct Installation Path to Clone A Website
4. Check .htaccess File for Redirect Loops
The .htaccess file in WordPress is responsible for managing redirects and permalink structures. A corrupted or misconfigured .htaccess file can cause redirect loops and trigger the ERR_TOO_MANY_REDIRECTS error.
Here’s how to fix it:
- Access your WordPress installation via FTP or your hosting file manager.
- Locate the .htaccess file in the root directory (usually in public_html).
- Rename the file to .htaccess_backup to disable it.
- Visit your site to see if the issue is resolved. If it is, this means the .htaccess file was the cause.
- To generate a new .htaccess file, log in to your WordPress dashboard, go to Settings > Permalinks, and click Save Changes. This will create a fresh .htaccess file with the default settings.
If the issue still persists, you may need to manually inspect the file for conflicting rules, particularly any additional custom redirects or security rules.
5. Disable SSL Temporarily
If your site uses SSL (HTTPS), an incorrect SSL configuration can also lead to redirect loops. This typically happens when WordPress or a plugin is forcing both http:// and https:// URLs, causing an endless redirect between the two.
To temporarily disable SSL:
- If you have access to your WordPress dashboard, navigate to Settings > General and change both WordPress Address (URL) and Site Address (URL) to start with http:// instead of https://.
- If you can’t access the dashboard, edit the wp-config.php file:
define('FORCE_SSL_ADMIN', false);
Save the file and try accessing your site via http://.
Once you’ve identified the cause, you can reinstall or properly configure SSL, ensuring you don’t force mixed HTTP and HTTPS redirects.
Read: Implementing Content Security Policy (CSP) in WordPress
6. Check for Hosting or Server-Level Redirects
Sometimes, server-level settings or configurations can cause redirect loops, leading to the ERR_TOO_MANY_REDIRECTS error. If you’ve recently set up redirects via your hosting control panel or .htaccess, verify that there aren’t conflicting rules.
Here’s what to check:
- Hosting Redirects: If you’ve set up any redirects in your hosting control panel (e.g., cPanel or Plesk), review them for possible conflicts.
- Server Caching: If your hosting provider uses server-side caching (like Varnish or NGINX caching), clear the cache and test your site again.
Contact your hosting provider if you suspect server-level configurations are causing the issue, as they may need to adjust server settings.
7. Clear WordPress Cache
If you’re using a caching plugin like W3 Total Cache or WP Super Cache, an outdated or corrupted cache can result in redirect loops. Clearing the cache may resolve the issue.
Here’s how to clear your WordPress cache:
- If you can access your WordPress dashboard, go to your caching plugin settings and clear the entire cache.
- If the caching plugin is causing the error and you can’t access the dashboard, disable the plugin via FTP (as described in method #3) and clear the cache at the server level if applicable.
8. Set Correct Cloudflare SSL Settings
If you use Cloudflare for DNS management and SSL, incorrect SSL settings can cause the ERR_TOO_MANY_REDIRECTS error, especially if there’s a mismatch between Cloudflare’s SSL settings and your WordPress SSL configuration.
Here’s how to check and fix it:
- Log in to your Cloudflare Dashboard.
- Go to the SSL/TLS tab.
- Ensure that the SSL setting is set to Full or Full (Strict). Avoid the Flexible setting, as it can cause redirect loops between Cloudflare and your server.
After adjusting the SSL settings, clear Cloudflare’s cache and check your site again.
9. Check Database for URL Mismatches
If none of the above methods work, the error could be due to URL mismatches in your WordPress database. Incorrect values in the wp_options table can cause redirect loops.
Here’s how to check and update the database:
- Access your database via phpMyAdmin (available in your hosting control panel).
- In the wp_options table, locate the rows for
siteurl
andhome
. - Make sure both values match the correct URL for your site, either starting with http:// or https:// depending on your SSL configuration.
- If needed, update the values and save the changes.
To Sum Up
The ERR_TOO_MANY_REDIRECTS error can be caused by several factors, ranging from incorrect URL settings to plugin conflicts or server configurations. By following the nine methods outlined in this guide, you can systematically troubleshoot and resolve the issue, ensuring your WordPress site gets back online quickly.
Make sure to back up your website and database before making any major changes, especially when editing core files like wp-config.php or .htaccess. With careful troubleshooting, you can resolve the ERR_TOO_MANY_REDIRECTS error and provide a seamless experience for your website visitors.