Useful for 301, 302, 307, and 308 responses.
Section: Status Code Classes
Follow redirects
bash
bash
curl -L https://example.comExplanation
Without `-L`, curl shows the redirect response; with `-L`, it follows the `Location` header.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Status Code Classes
Check headers and status with curl
Inspect the response line and headers only.
See the full request/response exchange
Use verbose mode to diagnose redirects, TLS, and headers.
HTTP status code classes
Understand the five categories of HTTP responses.
Debug status codes in the right order
A quick flow for deciding where a problem lives.