Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared Managed Cloud India
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Best lists Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Troubleshooting · Troubleshooting

How to Fix ERR_TOO_MANY_REDIRECTS in WordPress

Short answer

ERR_TOO_MANY_REDIRECTS means your site sends browsers in a circle between two addresses, so the browser stops after 20 redirects. Fix it by matching your Cloudflare SSL mode with your origin, making the WordPress and Site addresses agree, and forcing HTTPS in one place only. Then clear the cache and check the home page and wp-admin in a private window.

Key takeaways

  • A redirect loop is two rules sending visitors back and forth until the browser stops after 20 redirects.
  • Cloudflare lists a wrong SSL/TLS encryption mode first among the causes of ERR_TOO_MANY_REDIRECTS.
  • WP_HOME and WP_SITEURL in wp-config.php override the database values but do not change them.
  • FORCE_SSL_ADMIN behind a proxy that handles SSL can send requests into an infinite loop unless WordPress reads the forwarded protocol header.
  • Browsers can cache a permanent redirect, so check the fix in a private window after each change.

What does ERR_TOO_MANY_REDIRECTS mean in WordPress?

A redirect loop is a chain of redirects that never reaches a page.

Address A sends the browser to address B, and B sends it back to A. The browser follows each hop until it gives up and shows the error instead of your site.

MDN's guide to redirections in HTTP says a redirect response uses a status code starting with 3 and a Location header with the new address. Its table lists 301 and 308 as permanent redirects, and 302, 303, and 307 as temporary ones.

The WHATWG Fetch Standard says a request returns a network error once its redirect count reaches twenty. Chrome shows that failure as ERR_TOO_MANY_REDIRECTS.

MDN adds that most redirect loops are a server problem. Chrome shows the words “This Webpage has a redirect loop” when the browser detects one.

What causes the redirect loop most often?

The loop usually starts when two settings disagree about HTTP versus HTTPS, or about www versus no www.

One layer sends visitors to HTTPS while another sends them back to HTTP. The same fight can happen between www and non-www versions of the address.

CauseSignWhere to fix it
Cloudflare Flexible SSL plus an origin HTTPS redirectThe loop started after adding CloudflareCloudflare SSL/TLS mode
WordPress Address and Site Address disagreeThe loop started after a domain or HTTPS changeSettings > General or wp-config.php
HTTPS forced in two placesThe loop started after turning on SSL or an SSL pluginKeep one HTTPS switch on
Proxy handles SSL but WordPress cannot see itOnly wp-admin and wp-login.php loopwp-config.php proxy lines
Conflicting redirect rulesTwo rules point at each otherCloudflare rules, .htaccess, or a plugin
Stale cookies or cacheOnly one browser or one visitor loopsClear that site's cookies and cache

Work through the causes in the order above. Fix one layer at a time and check the site after each change.

How do you trace the redirect chain before changing anything?

Run one curl command and look at which addresses repeat.

The browser shows only the final error. Curl shows every hop, so you can see which two addresses point at each other.

curl -sIL --max-redirs 10 https://example.com/ | grep -iE '^(HTTP|location)'

Replace example.com with your own domain. Look for the same Location value repeating on every hop, and note the status codes, usually 301 or 302.

If the same HTTPS address repeats, WordPress or a server rule is sending the request to itself. If the address flips between HTTP and HTTPS, two layers disagree about the scheme.

Back up the site before you edit files or settings. Our guide to how to back up WordPress covers files and the database. A backup lets you undo a change that makes the loop worse.

How do you clear cookies and cache first?

Delete the cookies for your site, then load it in a private window.

This step takes two minutes and rules out a browser-side cause. It will not fix a server loop, but it stops you from chasing one that is already fixed.

Google's Chrome help page says deleting cookies may sign you out of sites that remember you, and your saved preferences can also be deleted. Delete cookies for your site only, not for every site.

  1. Delete your site's cookies in Chrome under Settings, then close the browser tab.
  2. Open a private window and load the home page.
  3. Purge the cache at your CDN or host, then load the page again.
  4. Try a second browser or a phone on mobile data.

If the private window loads but the normal window still loops, the cause was local cookies or cache. If every browser loops, the cause sits on the server.

How do you fix Cloudflare Flexible SSL mode?

Change Cloudflare to Full (strict) once your origin has a valid certificate.

Cloudflare's ERR_TOO_MANY_REDIRECTS page says that in Flexible mode, Cloudflare sends unencrypted requests to your origin server over HTTP. Redirect loops will occur if your origin server automatically redirects all HTTP requests to HTTPS.

That page was updated on 1 September 2026. Its fix is to remove HTTPS redirects from the origin server, or update the SSL/TLS encryption mode to Full or higher, which requires an SSL certificate at the origin.

Cloudflare's encryption modes page strongly recommends using Full or Full (strict) modes. In Full (strict), Cloudflare checks the origin certificate, which can be issued by a public CA like Let's Encrypt or by Cloudflare Origin CA.

Follow the steps in our guide to fix a Cloudflare redirect loop if the loop started right after you added Cloudflare. That guide walks through the same SSL mode change.

If your origin has no certificate yet, install one first. Switching to Full (strict) without a valid certificate swaps the loop for an SSL error. Our guide to Cloudflare SSL settings for WordPress covers the settings to check after the mode change.

How do you fix mismatched WordPress and Site addresses?

Make the WordPress Address and Site Address match the address your server uses.

WordPress stores two addresses. The Changing the Site URL page says the Site Address is the address you want people to type in their browser, while the WordPress Address is where your WordPress core files reside.

That same page says both settings should include the https:// part and should not have a slash at the end. A mismatch in scheme, www, or trailing slash can send visitors in a circle.

If you can reach wp-admin, open Settings > General and set both fields to the same address. Save, then log in again at the new address.

If wp-admin also loops, set the addresses in wp-config.php instead. The wp-config.php handbook says WP_SITEURL overrides the wp_options table value for siteurl, but it will not change the database value, and the URL will revert to the old value if the line is removed.

define( 'WP_HOME', 'https://example.com' );
define( 'WP_SITEURL', 'https://example.com' );

Add both lines above the line that says “That's all, stop editing!” Use your own domain in place of example.com, with no trailing slash.

How do you fix WordPress behind a proxy or CDN?

Tell WordPress that the visitor arrived over HTTPS, using the header your proxy sends.

A proxy or CDN can end the HTTPS connection and talk to your server over plain HTTP. WordPress then sees an HTTP request and redirects it to HTTPS, and the proxy sends it back as HTTP again.

The WordPress HTTPS handbook says FORCE_SSL_ADMIN can be set to true in wp-config.php to force all logins and all admin sessions to happen over SSL.

The handbook also warns that behind a reverse proxy that provides SSL, while WordPress itself runs without SSL, these options will initially send any requests into an infinite redirect loop.

The handbook fix is to configure WordPress to recognize the HTTP_X_FORWARDED_PROTO header. Add these lines above “That's all, stop editing!” in wp-config.php:

if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && strpos( $_SERVER['HTTP_X_FORWARDED_PROTO'], 'https' ) !== false ) {
    $_SERVER['HTTPS'] = 'on';
}

Only use this when every visit reaches your server through that proxy. A direct visitor could send the same header, so ask your host to confirm the proxy sets it.

If only the login page loops while the front end loads, the cause is often this proxy gap. Our guide to fix a login page that keeps refreshing covers the login-side signs of the same problem.

How do you find a bad plugin, theme, or .htaccess rule?

Switch off redirect, SSL, and cache plugins first, then check .htaccess and the theme.

A plugin that adds its own HTTPS or www redirect can fight the server rule. Start with the plugins you installed or updated most recently.

WordPress's Plugins screen page says Deactivate disables, or turns off, a plugin, and only active plugins can be deactivated. Use the bulk action to switch off several plugins at once.

  1. Deactivate any SSL, redirect, or cache plugin, then load the site.
  2. If the loop stops, switch the plugins back on one at a time to find the one that causes it.
  3. If it does not stop, deactivate all plugins and load the site again.
  4. If the site loads, reactivate plugins one at a time until the loop returns.

If you cannot reach wp-admin, rename the plugin folder over FTP or your host file manager. WordPress cannot load a plugin it cannot find, so it switches that plugin off.

Next, check .htaccess. Back up the file, then rename it and load the site. If the loop stops, the fault sits in a rule inside it.

The Changing the Site URL page says to make a backup copy of .htaccess first. It also says to update the file through the Permalinks screen after a URL change.

Regenerate a clean file by opening Settings > Permalinks and clicking Save Changes. Then add back only the custom rules you still need, one at a time.

If plugins and .htaccess are clear, switch to a default theme such as Twenty Twenty-Five. A theme redirect in functions.php can loop the same way a plugin rule can.

How do you confirm the fix worked?

The home page and wp-admin must both load with a 200 response and no redirect to themselves.

Run the curl command from the tracing step again. A fixed site answers with one redirect at most, from HTTP to HTTPS or from non-www to www, then a 200 response.

  1. Load the home page in a private window.
  2. Load wp-admin and log in.
  3. Load the same pages in a second browser.
  4. Click three or four internal links and check they load.

If the loop is gone but an SSL error appears instead, the certificate is the next problem. Our guide to fix ERR_SSL_PROTOCOL_ERROR covers the certificate checks that follow.

Keep the fix in place for a day and check again. A cached redirect or a CDN cache can hide a loop that returns when the cache clears.

When should you call your host?

Call your host when the loop lives in a layer you cannot see or change.

Ask for help in these cases:

  • You have no FTP or file manager access to edit wp-config.php or .htaccess.
  • The loop started right after a host migration, a server change, or a certificate install.
  • Your host forces HTTPS at the server, and you cannot turn that rule off.
  • You need a certificate installed on the origin before Cloudflare can use Full (strict).
  • The loop returns after every fix, which points to a server rule outside WordPress.

Tell support when the loop started and what changed just before it. Send them the curl output showing the repeated addresses, so they can see which layer sends each hop.

What mistakes should you avoid?

Change one setting at a time, and keep HTTPS enforced in one place only.

  • Do not switch Cloudflare back to Flexible to hide the loop. The connection between Cloudflare and your origin stays unencrypted in that mode.
  • Do not force HTTPS in Cloudflare, your host panel, a plugin, and .htaccess all at once. Pick one place for each redirect.
  • Do not edit wp-config.php or .htaccess without a backup copy first.
  • Do not leave a RELOCATE line in wp-config.php after the fix. The WordPress docs call leaving it in place insecure.
  • Do not add a second redirect to cancel out the first. Find the two rules that disagree and change one of them.

Frequently asked questions

Why does the error appear only in wp-admin?

The front end can load while wp-admin loops when WordPress forces admin sessions over HTTPS but cannot see that the visitor used HTTPS. A proxy or CDN ends the secure connection and talks to the server over plain HTTP. WordPress then redirects the login to HTTPS, the proxy sends it back as HTTP, and the circle repeats. The proxy header fix in wp-config.php breaks that circle.

Can clearing cookies fix the error for everyone?

No. Clearing cookies helps only the visitor who clears them, and only when stale cookies caused that one browser to loop. If every visitor sees the error, the loop sits in a server setting such as the Cloudflare SSL mode, the site addresses, or a redirect rule. Fix the server setting, then ask visitors to clear the site cookies once.

Is it safe to keep Cloudflare on Flexible SSL?

No, not as a long-term setting. Flexible encrypts the hop between the visitor and Cloudflare, but the hop between Cloudflare and your origin travels as plain HTTP. That gap also causes loops when the origin forces HTTPS. Install a certificate on the origin and switch to Full (strict) so both hops use HTTPS.

How long does a fix take to show up?

Most fixes show at once in a private window, but a cached permanent redirect can outlive the fix in a normal window. Browsers and CDNs can keep serving the old redirect for hours. Test in a private window, purge the CDN cache, and wait before changing another setting. If the loop is still there after that, the cause is a different layer.

Why did the loop start when I changed nothing?

Something else changed. A host can turn on a force-HTTPS rule, a CDN can be added, a certificate can expire, or a plugin update can add a redirect. Check the date the error started against host notices, plugin updates, and any SSL or CDN change. The most recent change to HTTPS, www, or redirect settings is the first place to look.

Does ERR_TOO_MANY_REDIRECTS hurt search rankings?

Yes, while it lasts. Search engines cannot index a page that never loads, and visitors cannot reach the content. Fix the loop first, then check that the home page and key pages return a 200 response. A page that loads again can be crawled and indexed normally, but lost traffic during the outage does not come back on its own.

Sources

  1. ERR_TOO_MANY_REDIRECTS Cloudflare Docs
  2. Encryption modes Cloudflare Docs
  3. Redirections in HTTP MDN Web Docs
  4. Fetch Standard WHATWG
  5. HTTPS WordPress Developer Resources
  6. Editing wp-config.php WordPress Developer Resources
  7. Changing the Site URL WordPress.org Documentation
  8. Delete, allow, and manage cookies in Chrome Google Chrome Help

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

WPLegible editors

Researched from the primary sources listed above and checked against our editorial rules. About the site · How we test