ERR_TOO_MANY_REDIRECTS: when the site redirects in a circle

The short answer: the browser says “the page redirected you too many times” when two rules contradict each other and send you back and forth, endlessly. It is almost always one of these: Cloudflare in flexible mode with an https rule on the server, two www rules, or a WordPress with its address badly set.

The causes, in order of likelihood

Cause How to recognise it What to do
Cloudflare in “Flexible” mode and a rule on the server forcing https It started after switching on Cloudflare or https. Set Cloudflare’s SSL to “Full” (or “Full (strict)”): Switching on SSL at Cloudflare without breaking the site.
Conflicting www rules One side sends to www and another removes the www (the .htaccess rule and WordPress’s, or a plugin’s). Keep just one rule: Redirecting to https and to the bare domain.
Different WordPress addresses (http and https, or www and non-www) The site and the dashboard go in circles. Under Settings > General, the “WordPress Address” and the “Site Address” must be equal and right: Changing the WordPress site address.
A redirect or https plugin adding itself to the .htaccess The error appeared after installing or updating a plugin. Deactivate the plugin: Disabling plugins.
Cache or cookies It works on another device, or in a private tab. Clear the site’s cookies and the cache: Clearing the cache.
Only on the WordPress login page The circle is between the login and the dashboard. See The login redirect loop.

Checking

1 Open the address in a private tab (no cookies). If it works, cookies are the cause.
2 See the redirect chain: in a terminal, curl -sIL https://your-domain.com | grep -i "^location" shows the addresses it passes through. If you see the same one twice, that is the circle.
3 Change one thing at a time and test: Cloudflare SSL, then the www rules, then WordPress.
4 Look at the .htaccess: how many RewriteRule lines for https and for www does it have? Leave just one of each.
Keep a copy of the .htaccess before editing it. And if your domain goes through Cloudflare, the circle may come from there and not from the server: see Cloudflare: when it helps, and the cache that fools you.

Still in a circle? Open a ticket with the address and whether you use Cloudflare or an https plugin.

Open a support ticket

SEE ALSO

Redirecting HTTP to HTTPS and www to the bare domain in nginx or Apache

How to redirect HTTP to HTTPS with .htaccess

Switching on SSL at Cloudflare without breaking the site

301 redirects when you change a page or a domain

RECOMMENDED PRODUCT

Web hosting with cPanel

Domain and SSL included, daily backups and the panel you already know. from R118.80/mo (3-year plan, with coupon)

See plans
  • 0 Users Found This Useful
Was this answer helpful?