How to Fix the “Too Many Redirects” Error: A Complete Troubleshooting Guide
The "Too Many Redirects" error β also known as a redirect loop β is one of the most frustrating issues a website owner or administrator can encounter. Your browser attempts to follow a chain of HTTP redirects, gets caught in an infinite loop, and eventually gives up, leaving visitors staring at an error page instead of your content.
In this comprehensive guide, you'll learn exactly what causes redirect loops, how to diagnose them systematically, and how to apply the right fix β whether you're running a WordPress site, a custom application on a VPS Hosting plan, or a simple site on Shared Web Hosting.
What Is the "Too Many Redirects" Error?
When a browser requests a URL, the server may respond with an HTTP redirect (status codes 301, 302, 307, or 308), instructing the browser to load a different URL. This is normal and expected behavior β for example, redirecting http:// traffic to https://, or redirecting domain.com to www.domain.com.
A redirect loop occurs when URL A redirects to URL B, which redirects back to URL A (or through a longer chain that eventually circles back). After hitting a browser-defined threshold (typically 10β20 redirects), the browser aborts the request and displays:
> ERR_TOO_MANY_REDIRECTS (Chrome)
> The page isn't redirecting properly (Firefox)
> This webpage has a redirect loop (Safari/Edge)
The error is the same regardless of the browser β only the wording differs.
What Causes the "Too Many Redirects" Error?
Understanding the root cause is essential before attempting a fix. The most common culprits include:
1. Misconfigured Redirect Rules
The most classic example: domain.com redirects to www.domain.com, while simultaneously www.domain.com redirects back to domain.com. Each redirect triggers the other, creating an infinite loop.
2. Improper HTTP-to-HTTPS Redirect Setup
If your server forces HTTPS but your SSL Certificates configuration isn't correctly applied, the server may redirect the HTTPS request back to HTTP, looping indefinitely between the two protocols.
3. Browser Cache and Cookie Conflicts
Outdated cookies or stale cached redirect data stored in the browser can cause it to follow an old, incorrect redirect path β even after the server-side issue has been resolved.
4. CMS Misconfiguration (WordPress and Others)
In WordPress, the WordPress Address (URL) and Site Address (URL) fields in the database must match your actual domain configuration. A mismatch β for example, one field using http:// while your server enforces https:// β is a very common cause of redirect loops.
5. Conflicting Plugins
Caching plugins, security plugins, and SEO plugins can each implement their own redirect logic. When two or more plugins attempt to manage redirects simultaneously, they can conflict and create loops.
6. Server-Level Redirect Conflicts
Redirects configured in your hosting control panel can clash with redirects defined in .htaccess, nginx.conf, or your CMS settings, resulting in contradictory instructions that loop endlessly.
How to Fix the "Too Many Redirects" Error: Step-by-Step
Work through these methods in order. Start with the simplest fixes before moving to server-level changes.
Method 1: Clear Your Browser Cache and Cookies
Before touching any server configuration, rule out a browser-side issue. Stale cookies and cached redirect responses are a surprisingly frequent cause.
Google Chrome:
- Press
Ctrl + Shift + Delete(Windows/Linux) orCmd + Shift + Delete(Mac) - Set the time range to All time
- Check Cookies and other site data and Cached images and files
- Click Clear data
Mozilla Firefox:
- Go to Settings β Privacy & Security
- Under *Cookies and Site Data*, click Clear Data
- Select both options and confirm
Microsoft Edge / Safari:
Follow the equivalent steps in each browser's privacy settings.
After clearing, reload the page. If the error disappears, the problem was browser-side. If it persists, continue to the next method.
> Pro tip: Test the URL in a private/incognito window immediately. Incognito mode uses no cached data or cookies, so if the site loads correctly there, the issue is definitively browser-side.
Method 2: Check CMS URL Settings (WordPress)
If you're running WordPress, incorrect URL settings are one of the most common causes of redirect loops.
Via the WordPress Admin Dashboard:
- Navigate to Settings β General
- Verify that both WordPress Address (URL) and Site Address (URL) are identical and use the correct protocol (
https://orhttp://) and subdomain (wwwor non-www) - Save changes
If you cannot access the admin dashboard (because the redirect loop prevents login), edit the wp-config.php file directly via FTP or your hosting file manager:
define('WP_HOME', 'https://www.example.com');
define('WP_SITEURL', 'https://www.example.com');Replace https://www.example.com with your actual domain. These constants override the database values and will immediately break the loop.
Via the WordPress Database (phpMyAdmin):
- Open phpMyAdmin and select your WordPress database
- Open the
wp_optionstable - Find the rows with
option_name=siteurlandhome - Ensure both values match your intended URL exactly
Method 3: Disable WordPress Plugins Temporarily
Caching, security, and SEO plugins are frequent offenders when it comes to redirect conflicts. The fastest way to identify a guilty plugin is to disable all of them at once.
If you can access the admin dashboard:
- Go to Plugins β Installed Plugins
- Select all plugins and choose Deactivate from the bulk actions menu
If you cannot access the dashboard (redirect loop blocks login):
- Connect to your server via FTP or SSH
- Navigate to
/wp-content/ - Rename the
pluginsfolder to something likeplugins_disabled - WordPress will automatically deactivate all plugins
Reload the site. If the error is gone, rename the folder back to plugins and reactivate plugins one at a time, testing after each activation to identify the conflicting plugin.
Common culprits include: Really Simple SSL, Redirection, Yoast SEO, W3 Total Cache, and Wordfence.
Method 4: Audit Your .htaccess File (Apache Servers)
On Apache-based servers, the .htaccess file controls URL rewriting and redirect rules. Conflicting or duplicate rules here are a very common cause of redirect loops.
Accessing .htaccess:
- Via FTP/SFTP: The file is in your website's root directory (e.g.,
public_html/) - Via cPanel File Manager: Enable "Show Hidden Files" to see
.htaccess
What to look for:
Search for RewriteRule and Redirect directives. Look for rules that could create circular logic β for example, a rule redirecting to HTTPS that fires even when the request is already HTTPS.
A correct, non-looping .htaccess configuration for HTTPS + www:
RewriteEngine On
# Redirect HTTP to HTTPS
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Redirect non-www to www (only when already on HTTPS)
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^example.com$ [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301]Key principle: Each redirect rule must include a condition that prevents it from firing when the request already matches the target. The RewriteCond %{HTTPS} off condition ensures the HTTPS redirect only fires for HTTP requests β never for HTTPS ones.
If you're unsure about your .htaccess rules, temporarily rename the file to .htaccess_backup. WordPress and most CMSs will regenerate a clean version automatically.
Method 5: Check Server-Level Redirects in Your Control Panel
Many hosting control panels (cPanel, Plesk, DirectAdmin) allow you to configure redirects independently of your .htaccess file or CMS. These server-level redirects can conflict with application-level redirects.
Steps:
- Log into your hosting control panel
- Look for a Redirects section (in cPanel, it's under Domains β Redirects)
- Review all configured redirects
- Remove any that duplicate or contradict redirects already handled by your CMS or
.htaccess
If you're managing a high-traffic site on a Dedicated Server, also check your Nginx or Apache virtual host configuration files for redirect directives that may conflict with application-level rules.
Method 6: Verify Your SSL/HTTPS Configuration
If the redirect loop only occurs on https:// URLs, the issue may be with how your SSL certificate and HTTPS enforcement are configured.
Common scenario: Your hosting control panel has "Force HTTPS" enabled, AND your .htaccess also contains an HTTP-to-HTTPS redirect, AND your CMS has an HTTPS plugin active. All three are firing simultaneously and conflicting.
Fix: Choose one layer to handle the HTTPS redirect and disable it in all others. The recommended approach is to handle it at the server level (virtual host config or control panel) and remove it from .htaccess and any plugins.
Ensure your SSL certificate is valid and properly installed. An expired or misconfigured certificate can sometimes cause unexpected redirect behavior. If you need a new certificate, SSL Certificates from AlexHost are easy to deploy and maintain.
Verifying the Fix
After applying any of the above fixes:
- Clear your browser cache and cookies again (changes won't be visible if old redirects are cached)
- Test in an incognito/private window to confirm the fix works without any cached data
- Use an online redirect checker such as Redirect Checker or httpstatus.io to trace the full redirect chain and confirm there are no loops
- Test multiple URL variations:
http://domain.com,https://domain.com,http://www.domain.com, andhttps://www.domain.comβ all four should resolve to a single canonical URL with no more than one or two redirects
How to Prevent Redirect Loops in the Future
Fixing a redirect loop is one thing β preventing it from recurring is another. Follow these best practices:
Establish a Single Canonical URL
Decide definitively on one canonical form of your domain: https://www.domain.com or https://domain.com. Configure all redirects across every layer (server config, .htaccess, CMS settings, plugins) to point to this single version. Document your decision so future changes don't inadvertently reintroduce conflicts.
Implement Redirects at One Layer Only
Don't configure the same redirect in your control panel, .htaccess, and a plugin simultaneously. Pick one authoritative layer and disable the others. This dramatically reduces the risk of conflicts.
Minimize Redirect Chains
Every redirect adds latency and increases the risk of loops. Aim for direct redirects: old-url β final-destination. Avoid chains like old-url β intermediate-url β final-destination. Tools like Screaming Frog can audit your site for redirect chains.
Test Before Deploying
Whenever you add new redirect rules, switch to HTTPS, or install a new plugin that handles URLs, test thoroughly in a staging environment first. A single misconfigured rule can take your entire site offline.
Keep Your CMS and Plugins Updated
Outdated plugins are more likely to contain bugs that cause redirect conflicts. Keeping WordPress core, themes, and plugins up to date reduces this risk significantly.
Conclusion
The "Too Many Redirects" error is almost always caused by conflicting redirect logic across one or more layers of your web stack β browser cache, CMS settings, plugins, .htaccess rules, or server-level configurations. By working through the troubleshooting steps in this guide systematically, you can pinpoint the exact source of the loop and resolve it quickly.
The key takeaways:
- Start simple β clear your browser cache and test in incognito first
- Check every layer β CMS settings, plugins,
.htaccess, and server config can all contribute - Enforce one canonical URL across all redirect logic
- Test after every change using a redirect checker tool
Whether you're managing a personal blog on Shared Web Hosting, a business application on a VPS Hosting plan, or a high-performance platform on Dedicated Servers, AlexHost provides the infrastructure, tools, and expert support to help you keep your site running smoothly β with zero tolerance for downtime caused by avoidable configuration errors.
on All Hosting Services