The HEAD method is identical to GET except that the server MUST NOT send a message body in the response.

Header parity rule

According to RFC 9110 Section 9.3.2: The server ought to return the same header fields in a response to HEAD as it would have returned if the request had been a GET.

This means headers like Content-Length, Content-Type, ETag, and Last-Modified reflect the size and properties of the actual payload without transmitting the body over the wire.

Key use cases for HEAD

  1. Pre-flighting large downloads: Check Content-Length before committing to download a multi-gigabyte file.
  2. Link health checkers: Automated bots check if URLs return 200 OK or 404 Not Found without wasting server bandwidth.
  3. Cache revalidation: Fast ETag checking against CDNs.

How to test with curl

Use curl -I (--head) to send a HEAD request:

curl -I https://api.example.test/v1/large-dataset.csv

Key takeaway

The HEAD method allows clients to inspect response metadata (Content-Length, ETag, Last-Modified) and verify resource existence without downloading payload bytes.