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

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? Let's talk.

From website design & SEO through to custom WordPress plugin development. I transform ideas into dynamic, engaging, and high-performing solutions.
Subscribe to get the latest insights & updates in the world of web and how it impacts your business and website.
© 2024 Phil Kurth  |  All rights reserved.