Follow redirects and show headers
Shows every response's headers across a full redirect chain, from the first request down to the final destination, without any body.
Last updated
curl -IL https://example.com
How it works
-I sends a HEAD request and prints only the response headers, never the body — the fast way to inspect status codes, content type and redirect targets without downloading anything. -L makes curl follow every redirect in the chain instead of stopping at the first response, so combined you see the full sequence of header blocks from the very first hop down to wherever it finally lands.
This combination is the quick diagnostic for "where does this URL actually go, and what does each hop say" — useful for checking that a shortlink, canonical redirect, or CDN rule resolves the way you expect before wiring real traffic through it.
Watch out for
- →Some servers respond differently to HEAD than to GET (an endpoint might 404 or 405 on HEAD while a real GET works fine) — if the headers look wrong or missing, retest with a real GET that still discards the body: curl -L -D - -o /dev/null https://example.com.
- →-I alone, without -L, only shows the FIRST response in the chain — you need both flags together, as shown, to see headers for every redirect hop rather than just the first one.
- →On Windows there's no /dev/null for the GET-with-headers alternative above — use -o NUL instead; the -IL command itself needs no such target since it never downloads a body.