On this page
A link checker using HEAD may report a failure even though the same URL opens in a browser. That does not necessarily mean the checker is wrong: the server, a redirect, or a security layer may handle HEAD differently from GET. This link checker HEAD vs GET guide explains how to investigate the difference without treating one failed request as proof that a page is unavailable.
Key Takeaways
- HEAD requests ask for response headers without the response body; GET requests normally retrieve the representation as well.
- Servers and intermediaries sometimes reject HEAD or route it differently, even when GET works.
- Compare both methods, redirect chains, status codes, and request context before classifying a link.
- A successful automated check shows only what that client observed at that time; it does not guarantee that every visitor can use the page.
How HEAD and GET differ
GET requests a representation of a resource. For a web page, that usually means receiving headers followed by HTML. HEAD asks for the corresponding response headers without a response body, making it attractive for link auditing when downloading every page would be wasteful.
A server should generally send the same headers for HEAD as for GET, but it may omit fields whose values are determined only while generating the content. HEAD is therefore useful for a quick check, not a guarantee that the subsequent GET response will have identical headers or succeed.
For example, a HEAD response might indicate 200 OK, while GET later fails during content generation. Conversely, HEAD might receive 405 Method Not Allowed while GET returns the page.
HTTP documentation could not be consulted in this environment; this explanation is based on established HTTP semantics. Check the current HTTP specifications and your server or library documentation for implementation-specific details.
Advertisement
Why servers respond differently
A method mismatch can occur at several points between the checker and the application:
- Application routing: An endpoint may support GET but not implement HEAD correctly. A
405response can indicate this; inspect itsAllowheader when present. - Security controls: A firewall, bot filter, or access policy may treat a checker's method, user agent, network address, or request rate differently from a browser's.
- Authentication and sessions: A browser may send cookies or other credentials that the checker lacks. A
401or403does not by itself establish that a page is unavailable to authorized users. - Redirects: The initial URL and its destination can behave differently. A checker that does not follow redirects may report the first response rather than the final page.
- Infrastructure and timing: Caches, proxies, deployments, rate limits, and temporary server errors can produce different results between requests, even when the method is not the cause.
Differences in language headers, cookies, device headers, or JavaScript execution can also affect what a browser sees. Compare the full request context before attributing a discrepancy solely to HEAD versus GET.
A cautious verification workflow
Use this workflow on URLs you are authorized to check. The commands below require curl and use https://example.com/ as a public example. Replace it with the URL you are investigating.
1. Check HEAD and inspect redirects
curl --location --head \
--max-time 15 --max-redirs 5 \
--proto '=http,https' --proto-redir '=http,https' \
https://example.com/
Read each HTTP status in the output, including intermediate redirects and the final response. A redirect loop, timeout, TLS error, or DNS failure is a different finding from a final HTTP error. The time and redirect limits keep this diagnostic bounded; adjust them to your environment.
2. Compare with GET
curl --location --dump-header - --output /dev/null \
--max-time 15 --max-redirs 5 \
--proto '=http,https' --proto-redir '=http,https' \
--write-out '\nFinal HTTP status: %{http_code}\n' \
https://example.com/
This follows redirects and prints response headers while discarding the body. It still downloads the body, so use it carefully on large resources. Check curl's exit status and error output as well as the HTTP status: a transport failure can occur without a useful final HTTP response. With these commands, an HTTP error status alone does not necessarily make curl exit unsuccessfully.
For a meaningful comparison, run the checks close together and use the same network and relevant request headers. Do not copy production credentials into commands, logs, or third-party tools. If access requires authentication, use an approved test account and a safe, authorized process.
3. Classify the observation
| Observation | Cautious interpretation | Next step |
|---|---|---|
HEAD returns 405; GET returns 200 | The endpoint may not support HEAD correctly. | Record the discrepancy and use the GET result for this check. |
HEAD or GET returns 401 or 403 | Access is restricted or the checker is blocked. | Verify expected authentication and policy; do not label it definitively broken. |
Either method returns 429 or a 5xx response | Rate limiting or a temporary service problem may be involved. | Retry later with backoff and investigate persistent failures. |
GET returns 404 or 410 | The resource may be missing or removed for this client. | Confirm the final URL and check whether authentication, routing, or deployment context changes the result. |
GET returns 200 | The server returned a successful status. | Check the content when necessary; an error page can also return 200. |
Record the method, time, initial and final URLs, redirect chain, status, and any transport error. A browser check can add useful evidence, but it is not an identical request: it may have a session, execute JavaScript, or load additional resources.
Advertisement
Designing a link-audit workflow
HEAD can be a first pass when bandwidth matters. If it fails or gives an ambiguous result, a bounded GET retry can provide another observation. Keep the two results rather than silently overwriting the HEAD failure. Some sites intentionally restrict automated access, so a GET retry is not a reason to evade those restrictions.
Use timeouts, response-size limits, concurrency limits, and restrained retries. Limit the number of redirects, and record when a limit prevents a conclusive result. Respect site policies and avoid repeated checks that place unnecessary load on an origin.
If your service accepts URLs to fetch, treat the fetcher as a security boundary. Allow only needed schemes, restrict destinations, and block loopback, private, link-local, and other prohibited addresses as appropriate. Validate resolved IPv4 and IPv6 addresses and ensure the actual connection uses an approved address; a hostname check alone does not prevent DNS rebinding. Revalidate every redirect, apply network egress restrictions, and avoid forwarding credentials across origins. Parsing a URL is not a complete SSRF defense.
Automated checks also have an unavoidable scope: they report one client's observation at one time. They may miss broken interactive flows, regional restrictions, inaccessible content, client-side rendering failures, and pages that return success for an error message.
Common Mistakes
- Marking every failed HEAD as a broken link: Try an authorized GET before drawing that conclusion.
- Treating every
200as a healthy page: A login screen or error message can be served with a success status. - Ignoring redirects or curl errors: The initial status, final status, and transport outcome tell different parts of the story.
- Comparing unlike clients: Different cookies, headers, networks, and timing can explain different results.
- Retrying aggressively: Repeated checks can trigger rate limits or burden the site.
Best Practices
Use result categories such as reachable, missing, access restricted, and inconclusive rather than a single pass/fail flag. Preserve the evidence behind each classification, and review important failures from an authorized browser or network when appropriate. For recurring audits, monitor patterns across runs instead of treating one transient failure as definitive.
Conclusion
HEAD is a useful lightweight signal, but GET and browser checks answer related, not identical, questions. Compare methods and request context, follow redirects carefully, and report uncertainty when the evidence is incomplete.
What would your domain sell for?
A free TidyURLs account unlocks the Domain Estimator. It prices a name from 191,011 real domain sales.