Follow a URL's Redirect Chain with curl

Reveal every hop a short link or http:// address passes through before reaching the final page.

macOScurlnetworksslLow risk
Run `curl -sIL -A "Mozilla/5.0" "http://example.com"` to print the Location headers of each redirect.

01Command

Command
$ curl -sIL -A "Mozilla/5.0" "http://example.com"

02What it does

Redirect-checking is a quick safety step before clicking a suspicious short link: each block of output shows one hop's status code and where it points next. -I fetches only headers, -L makes curl follow each redirect, and the User-Agent keeps some sites from serving odd responses to curl. The final block shows the real destination and whether it uses HTTPS.

03Risk

RiskLow risk
!Warning: This only requests headers, but the destination server still sees your request — do not run it against anything you would not open.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2026-09-18 · Category: Network