Error fix
How to fix “ERR_TOO_MANY_REDIRECTS”
The client stopped after too many redirects—usually a loop between HTTP/HTTPS or www/non-www rules.
Updated Apr 20, 2026
Tools that help with this
Fastest fix
Start here first. Step 1 fixes most cases—then work down the list.
- Use the redirect checker tool or curl -IL to print the full chain.
- Remove duplicate rules so only one layer handles http→https and canonical host.
- Fix cookie domain/path so auth succeeds without bouncing.
What this means
Each response sent a Location header that eventually points back to an earlier hop. Browsers cap hops to prevent infinite loops.
Common causes
Conflicting rewrite rules
CDN, nginx, and app each add a redirect for the same condition.
Cookie/session bounce
Login middleware redirects back to a URL that triggers login again.
Step-by-step fix
Map the chain
- Use the redirect checker tool or curl -IL to print the full chain.
- Remove duplicate rules so only one layer handles http→https and canonical host.
- Fix cookie domain/path so auth succeeds without bouncing.
Related
FAQ
- How many redirects is too many?
- Browsers differ; aim for at most one hop for common canonicalization.
- Loop only on login?
- Check SameSite cookies, callback URLs, and reverse-proxy forwarded headers.
- Cloudflare loops?
- Review SSL modes, page rules, and origin redirect headers for duplicates.
Fix related issues
Still stuck? Try these related fixes next.
- ERR_SSL_PROTOCOL_ERRORThe TLS handshake failed or spoke the wrong protocol—often cert, cipher, or version mismatch.
- ERR_CONNECTION_RESETThe TCP connection was reset before a complete HTTP response—often network paths, proxies, or firewalls.
- Axios network error (browser)Axios could not reach the server—no response object; often CORS, TLS, or offline.
- Next.js middleware redirect loopMiddleware keeps issuing redirects—often auth checks on public paths that bounce forever.
- Service worker fetch failedA service worker intercepted a request and the network failed—offline, CORS, or bad SW scope.
Edit your error
Tweak the message and run again—we'll match an existing fix or generate a new page.
Original error message
ERR_TOO_MANY_REDIRECTS
