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:

Got a project in mind?
Let's talk.

Every project starts with a conversation about what you need. You hear back the same or next business day. If I'm not the right fit, I'll say so. If I am, you get a fixed quote before any work starts.

Phil Kurth, web designer and developer in Geelong