Phil Kurth
/ Tips /

Use curl on the command line for some quick information on a URL

Last updated • 18 July 2023

One neat trick I use a fair bit is hitting URLs on the command line using curl. The most common use case I have for it is checking redirects but if you start using the command you’ll see there’s actually a fair bit of information handed back to you when you type the following in your command line:

curl -I https://hookturn.io/

There are loads of things you can do with the curl command and you should definitely check the manual – using man curl – to explore but by using the -I flag, we can request only the headers for the URL we want to inspect.

Here’s the entry in the manual for that flag:

Here’s a quick look at what you can expect when using the command:

Need a website?
Let's talk.

From website design and SEO through to custom WordPress plugins and web applications. Nearly twenty years of building for the web, and every project still starts the same way: a conversation about what you actually need.

Phil Kurth, web designer and developer in Geelong