12 min read
How to Check URL Redirects (and Read a Redirect Chain)
Check URL redirects step by step with TrueURL, curl and DevTools, read every hop of a redirect chain, and fix loops, long chains and mixed 301/302 redirects.
Read articleFree redirect tool
When a browser reports "too many redirects", the site is sending it in circles. TrueURL follows the redirects until the loop closes and shows every URL involved.
Press Enter to check
Cloudflare's edge always validates certificates, so this cannot skip the check. Certificate problems are reported in the result.
Sent with the first request, up to 16 KB. JSON bodies are sent as application/json, others as a form, unless you set a Content-Type header.
1 to 50. Browsers stop after 20.
Sites can redirect phones, crawlers and link preview bots differently.
Sent with every request in the chain.
No custom headers.
Enter a value to send this header. Header values are never saved.
Follow <meta http-equiv="refresh"> tags and Refresh headers found in HTML pages.
Follow simple, unconditional redirects such as location.href = "…" in page scripts.
Settings are remembered in this browser. Cookies, header values and the POST body are never saved.
A redirect loop happens when URL A redirects to URL B, and B, directly or through other hops, redirects back to A. Browsers follow about 20 redirects and then give up with an error: ERR_TOO_MANY_REDIRECTS in Chrome and Edge, The page isn't redirecting properly in Firefox, or Too many redirects occurred in Safari. Search engines can't index a page that is stuck in a loop.
TrueURL records every URL it requests, together with the request method and the cookies it holds at that moment. When a hop leads back to a URL it has already requested in the same state, the chain can never finish, and the result highlights the hop where the loop closes.
Because TrueURL keeps cookies like a browser, it can tell a real loop from a normal cookie handshake, where a site sets a cookie and sends you back to the same URL once. If the state changes on every pass, the chain continues until the Max Hops limit in Advanced Settings (at most 50). A chain that hits the limit is usually an endless loop too, for example one that adds a new query parameter on every hop.
www while another, often in the CMS or the hosting panel, removes it.Server, Via, CF-Ray or X-Powered-By, to see which layer sent the redirect: the CDN, the web server or the application.12 min read
Check URL redirects step by step with TrueURL, curl and DevTools, read every hop of a redirect chain, and fix loops, long chains and mixed 301/302 redirects.
Read articleIt's Chrome's error for a redirect chain that didn't end after 20 redirects, which is nearly always a loop: the site's redirect rules contradict each other. Check the URL above to see which URLs repeat.
Yes. Loops that depend on cookies, language, location or device only hit visitors in that situation. Reproduce them with Advanced Settings: add the cookie, an Accept-Language header or a mobile User-Agent, and check again. Loops that depend on the visitor's location can't be reproduced, because the request always comes from Cloudflare's network.
Then the loop was cookie-based: a stale or conflicting cookie made the site send you in circles. Clearing cookies resets your state, but the bug is still there for every visitor who gets the same cookie. Use the Cookies field in Advanced Settings to reproduce it here.
Your browser may be logged in, have consent cookies, or have an HSTS entry or a cached redirect that skips one of the hops. TrueURL starts with no cookies and no history, like a first-time visitor or a crawler. If it finds a loop, new visitors and crawlers probably run into it too, unless the site treats requests from data centers differently.
A loop means TrueURL came back to a URL it had already requested in the same state, so the chain can never end. Max Hops means it stopped after the configured number of redirects without an exact repeat. That chain might end eventually, but a chain that long is a problem either way. You can raise Max Hops to 50 to see further.
Yes, it's one of the most common causes. If the CDN talks to your server over HTTP while the server forces HTTPS, or if the CDN and the server redirect between www and non-www in opposite directions, they bounce every request back and forth. The response headers on each hop show which layer answered.