ERR_TOO_MANY_REDIRECTS means your browser was sent in a loop, such as HTTP → HTTPS → HTTP, and gave up. In WordPress, the usual causes are mismatched Site Address and WordPress Address URLs, Cloudflare “Flexible” SSL combined with a server HTTPS redirect, conflicting redirect plugins, or stale cookies. Clear cookies first, then check each layer.
A loop can hit your whole site, one page, or only the admin login. This guide shows how to trace it and fix the layer responsible.
Key Takeaways
- ERR_TOO_MANY_REDIRECTS means a redirect loop: the browser keeps being sent between URLs and never reaches a final page.
- The most common causes are mismatched WordPress URL settings, Cloudflare Flexible SSL combined with an origin HTTPS redirect, and conflicting redirect or SSL plugins.
- Trace the loop with curl -I or your browser’s Network panel before you change any rules.
- Back up your files and database before editing wp-config.php, .htaccess, or server settings.
- If the loop involves a reverse proxy, load balancer, multisite, or hosting-level redirects, a developer is usually the safer choice.
What Does ERR_TOO_MANY_REDIRECTS Mean?
A redirect sends the browser to a different address, such as from HTTP to HTTPS. ERR_TOO_MANY_REDIRECTS appears when redirect instructions conflict, so the browser keeps getting another redirect instead of the page.

How a WordPress Redirect Loop Happens
The simplest loop involves two pages that point at each other:
/page-a/ → /page-b/ → /page-a/
An HTTPS loop follows the same pattern:
http://example.com → https://example.com → http://example.com
This happens when one layer enforces HTTPS while another sends requests back to HTTP. The conflicting rules can live in WordPress URL settings, Cloudflare, plugins, Apache or Nginx, your hosting panel, or a reverse proxy. Your job is to find which one sends each redirect. Cloudflare lists HTTP-to-HTTPS conflicts as a cause of redirect loops in its ERR_TOO_MANY_REDIRECTS troubleshooting guide.
Why Browsers Stop: The 20-Redirect Limit
Browsers do not follow redirects forever. Chrome and Firefox stop after 20 redirects, per their source code (Chromium url_request.h and Firefox all.js). This follows RFC 9110, Section 15.4, which says: “A client SHOULD detect and intervene in cyclical redirections.”
The message differs by browser. Chrome shows ERR_TOO_MANY_REDIRECTS (“redirected you too many times”), while Firefox shows “The page isn’t redirecting properly.”
Redirect Loop vs. Redirect Chain
A redirect chain passes through several URLs but eventually reaches a final destination. A loop never does, because it returns to an earlier URL. A chain is not automatically a loop. For redirect types and chains, see our guide to 301 vs. 302 redirects in WordPress.
Before You Start: Back Up and Find Where the Loop Starts
Change one thing at a time, or you won’t know what fixed the loop. Make a recovery point first.
Take a Backup or Snapshot
Back up your files and database, including wp-config.php, .htaccess (on Apache), and a note of your current CDN and hosting redirect settings. If your host offers snapshots, confirm you can restore one. This matters most when you’re locked out of wp-admin and recovery means SFTP, SSH, or database access. For ongoing protection, see our guide to automated daily website backups.

Trace the Redirect Loop With curl or DevTools
The command-line tool curl shows each redirect a URL returns. Replace the example domain with your own:
curl -I -L –max-redirs 10 https://example.com/
-I requests headers only, -L follows redirects, and –max-redirs 10 stops curl after 10 hops. Each redirect response shows a status code and a Location: header, which is the next address the server wants the client to visit. Check whether:
- An HTTP URL redirects to HTTPS, and the HTTPS response redirects back to HTTP.
- The hostname keeps switching between www and non-www.
- The same Location: value appears again after another redirect.
If the sequence returns to an earlier URL, you have found the loop.
In a browser, open Developer Tools → Network, enable Preserve log, and reload the URL to see each redirect and its destination.
Does It Loop for the Whole Site, Only wp-admin, or One URL?
Test the homepage, a regular page, the login page, and the admin area separately:
- Entire site: start with WordPress URLs, Cloudflare SSL mode, and server redirects (Steps 3, 4, 7).
- Only /wp-admin/: start with HTTPS detection and FORCE_SSL_ADMIN (Step 5).
- One URL: start with redirect plugin rules or page-specific server rules (Steps 6, 7).
If the loop started after a specific change, such as a migration, Cloudflare, or a new host, use the symptom table further down.
How to Fix ERR_TOO_MANY_REDIRECTS in WordPress (Step by Step)
Work in order, but let your diagnosis pick the starting point. Retest after each change.
1. Clear Browser Cookies and Cache
Open the site in a private window. If it loads there but not in your usual browser, clear cookies and cached data for the domain. Clearing cookies won’t fix a server that keeps redirecting HTTP to HTTPS and back, so if every browser shows the error, keep going.

2. Clear WordPress, Server, and CDN Caches
Caching plugins, host or server caches, and CDNs can all serve an old redirect after you fix the rule. Clear one layer at a time and test. Our guide explains how to purge your WordPress cache safely. If a fresh, uncached request still loops, the cause is in the redirect configuration.
3. Check the WordPress Address and Site Address URLs
Wrong URL settings are a common cause, especially after a migration. WordPress has two fields:
- WordPress Address (URL): where the WordPress core files live.
- Site Address (URL): the public address visitors use.
According to the WordPress documentation on changing the site URL, both should include https:// and should not end with a trailing slash.
If you can access wp-admin: go to Settings → General and fix mismatches such as http vs. https, www vs. non-www, or an old domain.
If you can’t access wp-admin, WordPress documents several ways to fix the URLs without wp-admin; the three safest are below.
Option A: wp-config.php. You can hard-set both values:
define( ‘WP_HOME’, ‘https://example.com’ );
define( ‘WP_SITEURL’, ‘https://example.com’ );
These constants override the database values and lock the Settings fields.
Option B: WP-CLI. If you have SSH access:
wp option update home ‘https://example.com’
wp option update siteurl ‘https://example.com’
First confirm that wp-config.php isn’t overriding the same values.
Option C: the database. In phpMyAdmin, check the home and siteurl rows in wp_options (your prefix may differ). Back up first.
WordPress also documents a temporary RELOCATE constant, but the same documentation warns that leaving it in wp-config.php is insecure. Remove it as soon as you’re done.
4. Fix Cloudflare SSL/TLS Mode
In Flexible mode, Cloudflare connects to your origin server over HTTP. If the origin redirects HTTP to HTTPS, the visitor’s request loops: Cloudflare asks over HTTP, the origin answers “use HTTPS,” and Cloudflare asks over HTTP again. Under Full or Full (strict), the opposite happens if the origin redirects HTTPS back to HTTP. Conflicts with Always Use HTTPS, HSTS, or overlapping redirect rules can also cause loops..
To investigate, check the domain’s SSL/TLS mode, confirm the origin has a valid certificate, and review Always Use HTTPS, HSTS, and Redirect Rules. Once the origin certificate is valid, switch Flexible to Full (strict). For certificate setup, see our guide to installing an SSL certificate.

5. Fix Reverse Proxy or Load Balancer HTTPS Detection
WordPress decides whether a request is secure only from the HTTPS server variable or port 443, through is_ssl(). Behind a reverse proxy or load balancer that handles HTTPS and doesn’t pass the original scheme, WordPress sees plain HTTP and keeps redirecting.
This matters most with FORCE_SSL_ADMIN, which the WordPress HTTPS documentation says “will initially send any requests into an infinite redirect loop” behind a proxy that terminates SSL. The documentation gives this fix for wp-config.php:
define( ‘FORCE_SSL_ADMIN’, true );
// in some setups HTTP_X_FORWARDED_PROTO might contain
// a comma-separated list e.g. http,https
// so check for https existence
if( strpos( $_SERVER[‘HTTP_X_FORWARDED_PROTO’], ‘https’) !== false )
$_SERVER[‘HTTPS’] = ‘on’;
For Nginx reverse proxies, the same page includes this directive, which passes the original scheme to the backend:
proxy_set_header X-Forwarded-Proto $scheme;
This isn’t a universal drop-in fix: the proxy must be trusted and actually send the header, so test on staging first.
6. Deactivate Redirect, SSL, and Caching Plugins
A redirect plugin may point a URL at a page that another rule points back, or an SSL plugin may force HTTPS the server already forces. Check any recently changed plugin first.
If wp-admin works: temporarily deactivate the suspect plugin, test, and review its settings before reactivating.
If wp-admin is unavailable: rename the /wp-content/plugins/ folder via SFTP so plugins stop loading, or run this WP-CLI command:
wp plugin deactivate –all
Back up first, since this disables features such as checkout. If the loop stops, reactivate plugins one at a time. See our guides to WordPress plugin and theme maintenance and WordPress compatibility issues. If disabling plugins leaves you with a blank page instead, see our WordPress white screen of death guide.
7. Review .htaccess and Nginx Redirect Rules
Apache keeps rules in .htaccess; Nginx keeps them in its server configuration. Look for contradicting HTTP/HTTPS or www/non-www rules, redirects to old domains, and several rules enforcing the same canonical URL.
On Apache, you can reset .htaccess to the WordPress default rewrite block. Keep any host-specific rules your site needs, and don’t add Apache HTTPS rules if your host or another layer already handles that redirect.
A broken server rule can cause other failures, such as the WordPress 500 internal server error. After each change, retest the site and login page with curl.
8. Check Hosting-Panel and DNS-Level Redirects
Hosting panels often have a “Force HTTPS” toggle, and domain forwarding at your registrar can redirect requests before WordPress sees them. If the panel, Cloudflare, and a plugin all enforce HTTPS or a hostname, they can reverse each other. Each redirect must live in one layer only.
Common Causes and Fixes (Symptom → Fix Table)
Match when and where the loop appears to the step that covers it.
| Symptom | Likely cause | Where to fix | See |
|---|---|---|---|
| Loop only on wp-admin | FORCE_SSL_ADMIN behind a proxy that doesn’t pass HTTPS | wp-config.php, proxy config | Step 5 |
| Loop right after enabling Cloudflare | Flexible SSL plus an origin HTTPS redirect | Cloudflare SSL/TLS settings | Step 4 |
| Loop after a migration or domain change | Old domain or mismatched URL settings | WordPress URL settings, database | Step 3; migration section below |
| Loop after installing an SSL plugin | HTTPS enforced in two places | Plugin settings | Step 6 |
| Loop on a single URL only | Self-pointing redirect rule | Redirect plugin or server rule | Steps 6–7 |
| Loop after a hosting change | Host “Force HTTPS” or domain forwarding | Hosting panel, DNS | Step 8 |
| Works in a private window only | Stale cookies or cached data | Browser | Step 1 |
These are starting points, not a diagnosis. Confirm with a redirect trace before changing more settings.

Fixing Redirect Loops After a Migration or SSL Change
After moving WordPress, check the URL fields first (Step 3), then look for old URLs left in the database or redirect rules. Our website migration checklist and guide to migrating WordPress to another host cover the full process.
The WordPress migration documentation warns that direct database find-and-replace can break serialized data, and it documents a WP-CLI method instead:
wp search-replace ‘example.dev’ ‘example.com’ –skip-columns=guid
Swap in your real old and new domains, and confirm the scope before you run it. The –skip-columns=guid flag matters because WordPress advises against changing GUIDs. Only run it if stale URLs are actually involved.
If the loop started after you enabled HTTPS or renewed a certificate, check that the origin has the correct certificate, the WordPress URLs use https://, the CDN encryption mode suits the origin, and no old rules or temporary workarounds still point to HTTP. See our guide to SSL certificate renewals without downtime.
How to Prevent Redirect Loops
Most loops come from layers that disagree. Give each redirect one owner and test after every change.
WordPress redirect prevention checklist:
Keep HTTPS redirects in one layer only (CDN, server, hosting panel, or plugin, not several).
Make the WordPress Address and Site Address match your real setup, with one preferred hostname (www or non-www).
Use Cloudflare Full (strict) once the origin has a valid certificate.
Verify proxy HTTPS headers if you use a reverse proxy or load balancer.
Document each redirect rule: source, destination, reason, and the layer that owns it.
Remove outdated redirects after migrations.
Test the homepage, wp-admin, and key pages with curl after every redirect, SSL, or plugin change.
Monitor 3xx responses in a regular site crawl.
Keep a restorable backup before configuration work.
A working homepage doesn’t prove every URL works. A technical SEO audit can catch redirect problems across your important URLs.
Example: Tracing a Cloudflare Flexible SSL Loop (Hypothetical)
Hypothetical example. This scenario is for illustration only. It is not a real Websites USA customer case.
A WordPress site at example.com has just enabled Cloudflare. The origin server redirects HTTP to HTTPS, but Cloudflare’s SSL/TLS mode is still set to Flexible. When a visitor opens https://example.com/:
- Cloudflare requests the page from the origin over HTTP.
- The origin redirects to HTTPS.
- The browser follows it, Cloudflare asks over HTTP again, and the cycle repeats until the browser stops.
How the owner investigates. The error also appears in a private window, so cookies are unlikely. Cloudflare shows Flexible while the origin enforces HTTPS: a Cloudflare-origin conflict, not a WordPress problem.
The correction. With the origin certificate verified, the owner switches Cloudflare to Full (strict) (Step 4) and retests with curl until HTTP redirects once to HTTPS and wp-admin works.
When Should You Contact a Developer?
Some loops come down to one setting. Others need infrastructure access. Call a developer when:
- You can’t reach the server or wp-admin. Recovery may need hosting-level or database access.
- Your site sits behind a reverse proxy or load balancer. Forwarded headers and HTTPS detection must be set correctly.
- You run WordPress multisite. URL and database changes need extra care.
- The loop returns after a fix. Another layer probably still has a conflicting rule.
- Your host’s panel is involved. Resolving it may require inspecting server configuration.
Share the affected URL, when it started, recent changes, and any redirect trace. For ongoing help, explore our website maintenance services or work with a WordPress developer.
Get Your WordPress Site Back Online
ERR_TOO_MANY_REDIRECTS usually means two or more URL or HTTPS instructions disagree. Trace the redirects and fix the one conflicting layer instead of changing everything at once.
If the loop persists, Websites USA can trace the redirect configuration and plan a safe fix. Contact Websites USA to talk through your WordPress issue.
For other problems, see our guide to common WordPress errors and fixes or learn how to fix a WordPress site stuck in maintenance mode.
FAQs
1. What causes ERR_TOO_MANY_REDIRECTS in WordPress?
Conflicting redirects cause it. The most common sources are mismatched WordPress Address and Site Address URLs, Cloudflare Flexible SSL combined with an origin HTTPS redirect, redirect or SSL plugins that duplicate other rules, and stale cookies. Reverse proxies and hosting-panel redirects can also be responsible. Tracing the redirect sequence shows which layer is at fault.
2. How do I fix too many redirects in WordPress if I can’t access wp-admin?
Use SFTP, SSH, or database access instead. Check WP_HOME and WP_SITEURL in wp-config.php, review the home and siteurl options in the database or with WP-CLI, and deactivate plugins by renaming the plugins folder. Back up first, and ask your host for help if server configuration is involved.
3. Can Cloudflare cause a WordPress redirect loop?
Yes. In Flexible mode, Cloudflare connects to your origin over HTTP, so an origin that redirects HTTP to HTTPS creates a loop. Under Full or Full (strict), an origin redirecting HTTPS back to HTTP does the same. Always Use HTTPS, HSTS, and overlapping redirect rules can also conflict. Use Full (strict) with a valid origin certificate.
4. Will clearing cookies fix ERR_TOO_MANY_REDIRECTS?
Only if stale cookies or a login session cause the loop. If the site loads in a private window, clear cookies for the domain. If every browser shows the error, the problem is in your server or CDN settings.
5. Why does only wp-admin have a redirect loop?
An admin-only loop usually points to HTTPS detection. A common cause is FORCE_SSL_ADMIN behind a reverse proxy or load balancer that doesn’t pass the original HTTPS scheme, so WordPress keeps redirecting. Incorrect WordPress URLs can also be responsible. Check those settings before changing sitewide redirects, and confirm the proxy setup with your host.
6. How many redirects before a browser shows the error?
Chrome and Firefox stop after 20 redirects, according to their source code, then show an error instead of following the cycle forever.
7. Can a redirect loop hurt SEO?
Yes. While the loop persists, Googlebot can’t reach the affected page, just as visitors can’t, so that URL’s content can’t be crawled normally. Fix the conflicting redirects, confirm the final destination loads with a single clean redirect path, and recheck your important pages afterward so search engines can access them again.