Skip to content
Browser messages3 min read

ERR_TOO_MANY_REDIRECTS: an endless redirect loop

ERR_TOO_MANY_REDIRECTS

Short answer

ERR_TOO_MANY_REDIRECTS means the site keeps redirecting the browser from one URL to another in a loop, so the browser gives up after a number of hops. The usual causes are Cloudflare's Flexible SSL mode combined with forced HTTPS on the server, conflicting .htaccess rules, or mismatched WordPress URLs. The fix is one redirect rule and Full (strict) mode.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. Common causes
  2. Find the loop yourself
  3. How to fix it
  4. Prevention
  5. On ArabyHost

Chrome shows this with “This page isn’t working: example.com redirected you too many times.” A single redirect is normal, for example http to https. The trouble starts when URL A sends the browser to URL B and B sends it back to A, round and round.

Common causes

  • Cloudflare Flexible mode plus forced HTTPS on the server: requests always reach your server over HTTP, so it redirects to HTTPS every single time.
  • Conflicting .htaccess rules: one rule adds www and another removes it, or one forces HTTPS while a plugin sends visitors back to HTTP.
  • Mismatched WordPress URLs: siteurl and home don’t match the address the site is really served on.
  • Redirects in several places pulling in different directions: .htaccess, a WordPress plugin and Cloudflare rules.
  • Stale cookies holding a redirect or login state, as in the WordPress login loop.

Find the loop yourself

curl -sIL http://example.com | grep -iE "^(HTTP|location)"

This prints every hop. If the same two URLs keep alternating, that’s your loop, and it shows which direction is wrong.

How to fix it

If you’re a visitor

Clear cookies for this site only: click the padlock next to the address » Site settings, then delete its data, or try a private window. If the error persists, the problem is on the site.

If you own the site

  1. Fix the Cloudflare mode: under SSL/TLS » Overview choose Full (strict). Never combine Flexible with a server that forces HTTPS.

  2. Keep a single HTTPS rule at the top of public_html/.htaccess:

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    To drop www in the same rule:

    RewriteEngine On
    RewriteCond %{HTTPS} off [OR]
    RewriteCond %{HTTP_HOST} ^www\. [NC]
    RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
    RewriteRule ^ https://%1%{REQUEST_URI} [L,R=301]

    The .htaccess redirect generator builds similar rules for you.

  3. Remove duplicate redirects: check the Force HTTPS Redirect toggle in cPanel » Domains » Domains, redirect plugins in WordPress, and Redirect Rules in Cloudflare. Keep one place only.

  4. Align WordPress URLs: in Settings » General make “WordPress Address” and “Site Address” identical and starting with https://. If you’re locked out, add to wp-config.php:

    define('WP_HOME', 'https://example.com');
    define('WP_SITEURL', 'https://example.com');
  5. Purge caches in LiteSpeed Cache and Cloudflare, then re-run the curl test.

Prevention

  • Decide once on the final URL form (with or without www, always HTTPS) and enforce it in one place.
  • Test the redirect chain with curl after every change; aim for at most one 301 redirect.
  • When enabling SSL for the first time, follow the force HTTPS guide rather than stacking plugins.

On ArabyHost

AutoSSL issues a free certificate automatically once the domain points to the server, so Cloudflare can reach your site over HTTPS with a valid certificate: use Full (strict), not Flexible. LiteSpeed reads .htaccess just like Apache, so the rules above work as written. If you can’t find where the loop comes from, the Araby AI assistant in the panel can read your error logs and explain the cause. Full setup in using Cloudflare with your hosting.

FAQ

Why did the error start after I put the site behind Cloudflare?

Most likely Cloudflare's SSL mode is Flexible, so requests reach your server over HTTP, the server redirects to HTTPS, and the request comes back to the server over HTTP again. Switch the mode to Full (strict).

Will clearing cookies fix it?

Only if stale cookies cause the loop. If the loop is in the site's configuration it comes straight back, and only the site owner can fix it.

How many redirects does a browser allow?

Chrome stops after about 20 redirects in a row. Any real loop hits that almost instantly, and a healthy URL should need one redirect at most.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.