Show the redirect chain of a URL with status codes
check 301 or 302 redirect | show redirect chain command line | test http to https redirect | check www redirect curl | curl | redirect | seo | httpcurl -sIL "http://example.com/" | grep -iE "^(HTTP/|location:)"Sends HEAD requests, follows every redirect with -L and filters out the status lines and Location headers. This shows at a glance whether a redirect is permanent (301, 308) or temporary (302, 307) and how many hops it takes to reach the target. For search engines, the canonical address should be reachable with exactly one 301 redirect, chains like http to https to www waste crawl budget and load time.
Note: Some applications respond differently to HEAD than to GET. If in doubt, replace -I with -o /dev/null -D -.
Also searched as
- check 301 or 302 redirect
- show redirect chain command line
- test http to https redirect
- check www redirect curl