Understanding the ERR_TOO_MANY_REDIRECTS Loop
Before diving into fixes, let’s understand the mechanics. A redirect loop happens when:
- Your browser requests
URL A. - The server (or WordPress) tells the browser to go to
URL B. URL Bthen tells the browser to go back toURL A(orURL C, which then redirects toURL AorB).
This cycle repeats endlessly until the browser gives up, displaying the “too many redirects” error.
Common Culprits:
- Incorrect WordPress Address (URL) Settings: Mismatched
WordPress Address (URL)andSite Address (URL)in your database. .htaccessFile Misconfiguration: Improper redirect rules causing a loop.- SSL/HTTPS Issues: Incorrectly forcing HTTPS, leading to an HTTP > HTTPS > HTTP loop.
- Plugin Conflicts: Security, caching, or redirection plugins clashing.
- Server Configuration: Less common, but sometimes server-level redirects can be involved.
Step 1: Clear Your Browser Cache & Cookies (The Easiest Fix First)
Before you panic and start editing files, perform the simplest troubleshooting step:
- Clear your browser’s cache and cookies.
- Try accessing your site in an Incognito/Private window or a completely different browser.
Sometimes, your browser’s stored data is simply outdated or corrupted, causing it to remember old redirect rules. If this works, great! If not, proceed to more technical solutions.
Step 2: Check Your wp-config.php for Forced URLs (Direct File Edit)
It’s common for developers or even plugins to hardcode WordPress URLs in wp-config.php. If these are incorrect or conflict with other settings, they can cause a loop.
- Connect to your server via FTP/SFTP (or use your hosting provider’s File Manager).
- Navigate to your WordPress root directory (where
wp-config.phpis located). - Open
wp-config.phpfor editing. - Look for lines similar to these:
define('WP_HOME', 'http://yourdomain.com'); define('WP_SITEURL', 'http://yourdomain.com'); - Temporarily comment out or remove these lines.
- To comment out: Add
//at the beginning of each line (e.g.,// define('WP_HOME', 'http://yourdomain.com');).
- To comment out: Add
- Save the file and try to access your site.
If your site loads: You’ve found the issue! Make sure the URLs were correct. If you still want to hardcode them, ensure they use https:// if your site is SSL-enabled, and match your intended domain exactly.
Step 3: Inspect and Correct WordPress URLs in Your Database (Critical Step)
This is the most frequent cause of redirect loops. WordPress stores its primary URL settings in the wp_options table of its database. Mismatched or incorrect entries here are deadly.
You’ll need access to phpMyAdmin or a similar database management tool (usually available via your hosting control panel).
- Log into your hosting account’s cPanel (or equivalent).
- Find and open phpMyAdmin.
- Select your WordPress database from the left sidebar.
- Browse the
wp_optionstable (note: your table prefix might be different, e.g.,wp_xyz_options). - Look for the
option_namefields:siteurlhome
- Crucially, check their
option_valuefields. Ensure they are identical and correct, includinghttps://if your site uses SSL, and the correctwwwor non-wwwprefix.- Example of correct configuration for HTTPS:
siteurl:https://yourdomain.comhome:https://yourdomain.com
- Example of correct configuration for HTTPS:
- If you find any discrepancies or incorrect URLs, double-click the
option_valueto edit it, correct the URL, and press Enter to save. - Clear your browser cache again and try accessing your site.
Alternative Database Fix (When phpMyAdmin is Too Much):
If you’re uncomfortable with phpMyAdmin, you can temporarily add these lines back to your wp-config.php below the ABSPATH definition to force WordPress to use specific URLs on load. This overrides database values:
define('WP_HOME','https://yourdomain.com');
define('WP_SITEURL','https://yourdomain.com');
Remember to use your actual domain and https:// if applicable! Once you regain access, check Settings > General in your WordPress dashboard. If the URLs appear correct there, you can remove these two lines from wp-config.php as the database values are now correct.
Step 4: Reset Your .htaccess File (Server-Side Redirects)
The .htaccess file, located in your WordPress root directory, handles server-level redirects and URL rewrites. A misconfigured .htaccess is a prime suspect for redirect loops.
- Connect via FTP/SFTP (or use your hosting File Manager).
- Navigate to your WordPress root directory.
- Locate the
.htaccessfile. - Rename it to something like
htaccess_old.txtorhtaccess_backup.bak. This effectively deactivates it without deleting it. - Create a new file named
.htaccessin the same directory. - Paste the default WordPress
.htaccessrules into this new file:# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress - Save the new
.htaccessfile. - Clear your browser cache and try to access your site.
If your site loads: The old .htaccess file was the culprit. You’ll now need to go to Settings > Permalinks in your WordPress dashboard and simply click “Save Changes” (without making any actual changes). This will regenerate the default .htaccess rules and ensure your permalinks work. If you had custom redirects or rules, you’ll need to carefully re-add them one by one to your new .htaccess file, testing after each addition to find the problematic rule.
Step 5: Deactivate All Plugins (Plugin Conflict Resolution)
Plugins, especially those related to security, caching, or redirects (e.g., Yoast SEO, Rank Math, Redirection, Really Simple SSL, caching plugins), can often cause redirect loops due to conflicting rules or misconfigurations.
Since you likely can’t access wp-admin, you’ll need to deactivate them manually via FTP.
- Connect via FTP/SFTP.
- Navigate to
/wp-content/. - Rename the
pluginsfolder toplugins_old. - Clear your browser cache and try to access your site.
If your site loads: A plugin was causing the conflict.
To find the specific plugin:
- Rename
plugins_oldback toplugins. - Log into your WordPress dashboard (it should now be accessible, though plugins will still be inactive).
- Go to Plugins > Installed Plugins.
- Activate your plugins one by one, testing your site after each activation. The moment the
ERR_TOO_MANY_REDIRECTSerror reappears, you’ve found the conflicting plugin. - Once identified, you can either:
- Delete it and find an alternative.
- Contact the plugin developer for support.
- Look for specific settings within that plugin that might be causing a redirect.
Step 6: Check Server Configuration (Advanced / Hosting Support)
While less common, sometimes server-level redirects or misconfigurations in your virtual host settings can cause loops.
- Cloudflare/CDN: If you’re using a CDN like Cloudflare, ensure your SSL settings are configured correctly. A common issue is having Cloudflare set to “Flexible SSL” while WordPress is trying to force full SSL, leading to a loop between Cloudflare and your origin server. Try setting Cloudflare’s SSL to “Full (strict)” or “Full.”
- Nginx Configuration: If your server uses Nginx instead of Apache, there’s no
.htaccessfile. You’ll need to check your Nginx configuration files (e.g.,nginx.confor site-specific config files) for redirect directives that might be causing the loop. This usually requires server access or contacting your hosting provider.
If you’ve exhausted all other options, it’s time to contact your hosting support team. Provide them with details of the error and the steps you’ve already taken. They can often review server logs and configurations that you might not have access to.
Conclusion: A Systematic Approach Saves Your Site
The ERR_TOO_MANY_REDIRECTS error can be a major headache, but by systematically working through your wp-config.php, database, .htaccess file, and plugins, you can pinpoint and resolve the issue. Remember to always clear your browser cache between steps and, most importantly, always have a recent backup before making any direct file or database edits.
Don’t let a redirect loop hold your WordPress site hostage. By following these developer-level troubleshooting steps, you’ll regain control and get your site back online.
Still seeing too many redirects and feeling lost in the code?
If you’ve tried these solutions and your WordPress site is still stuck in a redirect loop, it might be time for expert intervention. Contact me for professional WordPress emergency support and debugging services. I can help diagnose and fix complex server and database issues quickly.