Error fix
How to fix “Redirect loop detected”
Requests bounce between URLs without reaching a stable page—often conflicting canonicalization 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.
- Print the redirect chain with curl -IL or the redirect checker tool.
- Consolidate rules so one layer owns canonical URL policy.
- Add tests for top entry URLs after deploy.
What this means
Each hop returns another redirect until a client limit is hit. The chain never settles on a 200 response.
Common causes
HTTPS and host rules
http→https and apex↔www both fire in a circle.
App middleware
Auth or locale redirects send the user back to the starting URL.
Step-by-step fix
Break the cycle
- Print the redirect chain with curl -IL or the redirect checker tool.
- Consolidate rules so one layer owns canonical URL policy.
- Add tests for top entry URLs after deploy.
Related
FAQ
- Infinite 301 between two hosts?
- Pick a single canonical host and 301 everything else once.
- Loop only when logged in?
- Fix session cookie scope and post-login redirect targets.
- CDN + origin both redirect?
- Disable one side’s redirect or use origin pull without double HTTPS.
Fix related issues
Still stuck? Try these related fixes next.
- WooCommerce payment gateway errorCheckout failed at the PSP—credentials, webhooks, or currency mismatch.
- WordPress critical errorPHP fatals before the theme loads—plugin conflict, syntax error, or exhausted memory.
- robots.txt blocking important pagesCrawlers obey Disallow rules—misconfigured robots.txt can hide whole sections from search.
- Sitemap not foundCrawlers or tools could not fetch your sitemap URL—404, wrong path, or blocking rules.
- Missing package.json fileNode/npm expected a package.json in this folder—the project root is wrong or the file was never created.
Edit your error
Tweak the message and run again—we'll match an existing fix or generate a new page.
Original error message
redirect loop detected
