Merry Christmas & Happy 2027! Less downtime. More good times. Celebrating 13 years of sorlavit.com
Skip to content
Sorlavit KimIT Support, Network & Infrastructure Services Let’s talk

Articles are written in English. The Thai translation button opens Google Translate; code and commands stay in their original form.

Linux Commands / IT Support Guides

Inspect an HTTPS endpoint from Linux with curl

Ask a website for its response headers and read the HTTP status.

Compiled for Sorlavit Kim · Published · Updated · 1 min read

Environment and inputs: Linux · Bash-compatible shell; package and service names vary by distribution

Understand the problem

Use the exact URL reported by the user. A response may come from a proxy or load balancer in front of the application.

Run the command

The example sends an HTTP HEAD request, with up to five seconds to connect and 15 seconds for the whole operation.

curl --head --connect-timeout 5 --max-time 15 https://example.com

Read the output

Look at the status line. HTTP/2 200 means the server accepted the HEAD request. A 301 or 302 usually points to another URL via the Location header. HTTP 405 may mean that the server does not accept HEAD.

Choose the next step

If curl prints no HTTP status, read its error to distinguish name resolution, connection and certificate problems. If HEAD is unsupported, check using the request method the application expects.

Before making changes

Record the URL, time, status and any error. A successful HEAD request confirms the headers were returned and leaves the page body and user workflow to be checked separately.

Share this article

Back to all articles