HomeGuidesEditorial

ZALEYO RESEARCH & GUIDES

ERR_TOO_MANY_REDIRECTS on WordPress: Diagnose HTTPS and Cloudflare Loops

WordPress stuck in ERR_TOO_MANY_REDIRECTS? Trace HTTP/HTTPS redirects, WordPress URLs, Cloudflare SSL modes and conflicting plugin rules safely.

ERR_TOO_MANY_REDIRECTS means the browser followed a redirect chain that never reached a stable page. On WordPress, a loop often appears after switching to HTTPS, connecting a reverse proxy such as Cloudflare, changing domain names or enabling more than one redirect feature. Deleting browser cookies can help with an account-specific login loop, but it cannot repair a server-wide HTTP/HTTPS configuration conflict.

Find out whether the loop affects everyone

Before editing anything, test the homepage in a private browser window, on a different connection and, if possible, on another device. Compare the site’s public homepage with a known internal page. If only your authenticated dashboard loops, investigate cookies and login plugins. If public pages fail for every visitor, trace server and CDN redirects before clearing unrelated caches.

Record the current settings and take a backup of WordPress files and database before changing WordPress Address, Site Address or server rewrite files. Making multiple changes at once makes it difficult to identify which condition caused the problem.

Step 1: Trace redirects, not just the final browser error

From a terminal, you can inspect a public URL without modifying the website:

curl -I https://yourdomain.com/
curl -I http://yourdomain.com/
curl -L -I --max-redirs 10 https://yourdomain.com/

The Location headers show where an HTTP redirect points. These commands use HEAD requests and some servers handle HEAD differently from GET; repeat with a normal GET when the diagnostic results conflict with what visitors see. A typical loop alternates between http:// and https://, or between www and the root host. Draw the actual chain before deciding which component to fix.

Step 2: Check Cloudflare’s SSL/TLS mode

Cloudflare documents a common failure pattern: its Flexible SSL/TLS mode accepts HTTPS from a visitor but connects to your origin using HTTP. If the origin immediately redirects every HTTP request back to HTTPS, the visitor can be trapped in a repeating loop. Cloudflare’s official guidance says not to use Flexible mode with an origin that forces HTTPS; a properly configured Full or Full (strict) setup uses HTTPS for the origin connection and avoids this particular mismatch.

Do not blindly select Full (strict) if the origin server’s certificate has not been provisioned or validated. First ensure the certificate is valid for the host and that the HTTPS origin works. An incorrectly configured Full (strict) deployment may present a certificate error rather than solve the problem. Cloudflare’s Flexible mode documentation explains the original HTTP-to-HTTPS loop.

Step 3: Review redirect controls in one place

Possible redirect layers include your hosting control panel, Nginx or Apache web-server rules, WordPress plugins, Cloudflare redirect rules and “Always Use HTTPS” settings. A conflict happens when one layer sends visitors to URL A and another sends them back to URL B.

Make a list of the components that can redirect requests. Preserve the intended permanent HTTPS destination and disable or modify only the rule that creates a conflict. Do not disable HTTPS protection site-wide as a generic solution, especially on a website with logins or personal data. Cloudflare’s redirect loop troubleshooting guide describes encryption-mode conflicts and overlapping redirect rules.

Step 4: Compare WordPress Address and Site Address

WordPress usually exposes Settings → General → WordPress Address (URL) and Site Address (URL). These values can legitimately differ when WordPress is installed in a subdirectory, so do not force them to match without understanding the installation. After a domain move, an unexpected old host or scheme may contribute to redirects and wrong canonical links.

Check whether WP_HOME or WP_SITEURL constants override values stored in WordPress settings. Editing these values incorrectly can make the admin interface inaccessible. If you are locked out, ask your hosting administrator to inspect current configuration safely rather than guessing database values in production.

Step 5: Is the problem a redirect loop or a WordPress 404?

These are different errors. A true loop has repeated 301/302/307/308 responses. An HTTP 404 means WordPress or the server did not find the requested resource. After plugin updates or custom post type changes, WordPress rewrite rules can become stale. The official WordPress documentation says that visiting Settings → Permalinks refreshes rewrite rules; if the server configuration still lacks working rules, an administrator may need to inspect Apache .htaccess or Nginx routing.

A rewrite-rule refresh should not be the first fix for a clearly repeating HTTPS redirect chain. Conversely, changing SSL mode may not fix a simple 404 for an article. If you are preparing a website for discovery, read our website readiness checklist for the distinction between accessible pages, canonical URLs and sitemap entries.

Decision table: symptoms and the next best test

Symptom What to inspect Avoid
HTTP/HTTPS flips repeatedly Reverse-proxy SSL mode and origin HTTPS rule Changing several encryption settings at once
www and root domain keep alternating Host redirects, WordPress site URL and CDN rules Adding a third competing redirect
Only login pages loop Session cookies, secure-cookie handling, authentication plugin Assuming every visitor has the same issue
Articles 404 after plugin or route change Registered rewrite rules and server routing Treating HTTP 404 as a redirect loop
Browser works in private mode only Site-specific cookies, extensions and login state Changing server settings without evidence
Page redirects after migration to an old domain Configured host URLs, redirect map and canonical links Redirecting every old page to the homepage

Recovery procedure for a live site

  1. Capture a clean redirect trace for the public homepage and one representative failing URL.
  2. Locate the first conflicting hop in the chain. Compare the response when routed through the CDN with the origin’s expected behavior, without exposing a private origin publicly.
  3. Back up the current settings. Record DNS, proxy mode, WordPress URLs and redirect rules.
  4. Correct one conflicting rule or align the origin protocol with a properly configured proxy mode.
  5. Retest the home page, one internal article, login, admin, mobile and both HTTP/HTTPS entry paths.
  6. Check indexing consequences only after accessibility is restored. Verify one final canonical URL and that important sitemap entries use the intended host.

What about Google indexing after the site is fixed?

A prolonged redirect loop can prevent visitors and crawlers from accessing content. Once resolved, make sure your important pages return their correct final responses and that links, canonical tags and XML sitemap URLs point to the same destinations. If Google still shows pages as excluded, investigate that separately with our Search Console indexing troubleshooting guide and the IndexNow versus XML sitemap comparison.

Primary references

Editorial note: The correct fix depends on the observed redirect chain, hosting setup and TLS configuration. Never deploy a certificate or rewrite change solely because it fixed a different site.

Selected sources

Links lead to the original publishers. Their content and privacy practices are independent of Zaleyo.

Keep exploring

Find more practical, independently written explanations on Zaleyo. Every guide links to its references and helps you compare the next steps.