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.

How To Follow Redirect using cURL

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

Try Scrapingdog for Free!

Get 200 free credits to spin the API. No credit card required!