Specify UserAgent with curl command

Tadashi Shigeoka ·  Thu, January 11, 2018

I’ll introduce how to specify UserAgent with the curl command.

Linux | リナックス

Specifying UserAgent with curl command

As an example, I used a curl command to access http://example.com by specifying the Facebook crawler’s UserAgent.

curl -H 'User-Agent: facebookexternalhit/1.1' \\
http://example.com

That’s all from the Gemba where I wanted to access with curl command while disguising the UserAgent as Facebook crawler.

References