workspacereference / tools / guidesPUBLIC TOOLS
Syntaxfield
Browse ▾
GUIDES / HTTP STATUSES

Status codes describe outcomes.

A response status should say what happened to the requested representation, not what the server wants to look like.

200, 204 and 304 are not interchangeable

200 OK ordinarily carries a response representation. 204 No Content indicates success without one. 304 Not Modified tells a conditional client to reuse a cached representation; it is not a generic status for an unchanged page.

For a static website, a missing document should normally return 404 Not Found instead of a fake successful response. A branded error page can still use the correct 404 status.

Know the failure class

400 Bad Request indicates malformed client input. 401 Unauthorized involves an authentication challenge, while 403 Forbidden indicates a refused operation. 404 is used when no requested resource is found. 503 Service Unavailable describes a temporary inability to serve a request.

Error handling should preserve meaningful status codes and avoid accidental redirect loops.

Check the exact response

Inspect headers and status before assuming a browser page tells the whole story. Some reverse proxies replace upstream error bodies while keeping or changing status codes.

curl -I https://example.org/page
curl -v https://example.org/missing