HEAD
The HTTP HEAD method requests the headers for a resource without transferring the body. The response is identical to a GET response except the server omits the message body.
Usage
A HEAD request retrieves metadata about a resource: size, type, freshness, and existence. The server processes the request exactly as a GET but stops before transmitting the body. All response headers, including Content-Length and Content-Type, match those of a full GET response.
Properties
| Property | Value |
|---|---|
| Safe | Yes |
| Idempotent | Yes |
| Cacheable | Yes |
Common use cases
Link validation. Automated tools send HEAD requests to verify URLs return 200 without downloading full pages. Broken links surface as 404 or 410 responses.
Monitoring and health checks. Uptime monitors probe endpoints with HEAD to confirm availability. The smaller response size reduces bandwidth and speeds up polling intervals.
Content negotiation probing. Clients inspect Content-Type, Content-Encoding, and Content-Language headers before deciding whether to fetch the full resource.
Cache validation. A HEAD response carrying ETag or Last-Modified allows caches to check freshness without downloading the body. If the HEAD response headers indicate a cached copy is stale, the cache marks the entry accordingly.
Download size estimation. File managers and download tools read Content-Length from a HEAD response to display file size or allocate disk space before starting the transfer.
Note
A request body in a HEAD request has no generally defined semantics. Some implementations reject HEAD requests carrying a body. Including a body risks triggering request smuggling vulnerabilities in intermediaries misparsing the message framing.
Example
A HEAD request to check whether a resource exists and inspect the response headers. The server returns 200 with content metadata but no body.
Request
HEAD /report.pdf HTTP/1.1
Host: www.example.re
Response
HTTP/1.1 200 OK
Content-Type: application/pdf
Content-Length: 284750
Last-Modified: Mon, 10 Feb 2025 08:30:00 GMT
ETag: "f47ac10b"
The Content-Length header reveals the file is roughly 278 KB. The Last-Modified and ETag headers provide validators for conditional requests on subsequent fetches.
Takeaway
The HTTP HEAD method retrieves response headers without the body, making resource validation, monitoring, and cache checks efficient. Every header present in a GET response is also present here, but no bandwidth is spent transferring the actual content.