Use code BLACKDOG15 to get 15% off any Scrapingdog plan this Black Fridayfor 15% off this Black Friday

How To Follow Redirect using cURL

How To Follow Redirect using cURL

Using -l or --location one can follow redirects using cURL. In this quick tutorial, we have briefly explained how you can do this.

Using -l or --location one can follow redirects using cURL. Let’s understand it with a real-world example.

curl -L http://scrapingdog.com

If you need HTTP headers in the output then you can use -i option of cURL.

curl -L -i http://scrapingdog.com

testing

Additional Resources