Networking

What is HEAD?

HEAD is an HTTP request method that returns a resource's response headers but no body, to check that it exists, how big it is, or whether it changed.

What is the HTTP HEAD method?

HEAD is one of the request methods a browser or other client can send to a web server. It asks for exactly what a GET request for the same URL would return, except that the server sends back only the status line and the response headers, never the body. The client learns whether the resource is there and what it is (its type, its size and when it last changed) without downloading it.

Not to be confused with the read/write head inside a hard drive, the part on the actuator arm that reads and writes the platters. That has its own glossary page.

What it's used for

  • Checking that a resource exists. A 200 OK status means it's there; a 404 Not Found means it isn't.
  • Finding a file's size before downloading it. The Content-Length header usually reports how many bytes a GET would return.
  • Cache checks. The Last-Modified and ETag headers show whether a resource has changed since a copy was saved.
  • Link checkers and uptime monitors. Tools that test many URLs, or poll a site every few minutes, can use HEAD to save bandwidth.
  • Troubleshooting. Headers reveal redirects (a 301 or 302 status with a Location header), the content type and security headers.

From a command line, curl -I https://www.example.com sends a HEAD request and prints the headers.

HTTP methods compared

MethodWhat it doesChanges data on the server?
GETRetrieves a resource, such as a web page or image, with its bodyNo
HEADSame as GET, but returns the headers onlyNo
POSTSends data to the server, such as a submitted form or a file uploadYes
PUTUploads or replaces a resource at a specific URLYes
DELETERemoves a resource from the serverYes

GET and HEAD are called safe methods because they only read. A server must not send a body in reply to HEAD, even when the GET for the same URL would return one.

For the CompTIA A+ exam

Core 1 (220-1201) objective 2.3 lists web servers among the server roles, and objective 2.1 covers HTTP on port 80 and HTTPS on port 443. HTTP methods aren't named in the objectives, but knowing the basic ones helps with web server scenarios: GET fetches a page, POST submits a form, and HEAD fetches only the headers. If a question about storage mentions a drive head, it means the hard drive's read/write head instead.

Studying for CompTIA (Networking)?

ExamWizardz turns the official objectives into a guided study plan — with practice tests, realistic PBQs, and a readiness score. Start free.

Start studying free

Related terms