HTTP status codes: what happened?
08Send a request, predict the reply, then change the cause. Explore twelve stories from a missing page to a stalled server.
Start with the browser’s goal. The server’s state and policy determine its answer.
Change the situation below, predict a reply, then use Next to trace the cause.
Change the situation
Read a story on a website.
Changing a choice returns to the beginning. Next follows each cause; Restart restores the original story.
Offline teaching examples with explicit server policies. Nothing is sent to a website. Several statuses can be appropriate in real applications; these examples are not a universal decision tree. Space plays or pauses the steps; reduced-motion preferences are respected.
Look up a status code · searchable index
Explore the registered names and their original sources. Stories above cover common decisions; specialized extensions have their own rules.
Historical WebDAV registration; not included in the later RFC 4918.
Temporary registration; listed expiry 13 November 2026. Check IANA for current status.
Deprecated. Do not use this to configure a proxy.
Unused; reserved.
Reserved for future use; no standard payment workflow is defined here.
Unused in HTTP Semantics. The famous teapot code came from an April 1 joke.
Registry snapshot: 5 November 2026. Temporary registrations can expire. Check the current IANA registry ↗. Read the MDN reference ↗.
When redirected, reconstruct the request and assess fields and credentials for the new target.
Key idea: A status code reports what happened to one request. The cause tells you what to do next.
Terms
- Client / user agent
- The app making a request; in this example, your browser.
- Origin server
- The server responsible for providing an answer for the target resource.
- Request
- A message asking for an action on a resource.
- Response
- The server’s message reporting the result of a request.
- Resource
- Something identified by a URI, such as the page at /story.
- Representation
- Content and descriptive information that convey a resource’s state, such as an HTML page.
- Semantics
- What a message or protocol element means, independently of how it travels.
- Status class
- The first digit groups outcomes: informational, success, redirection, client error or server error.
- Redirect
- A response that can direct a client to another URI.
- Location
- A field identifying a URI associated with the response, including a redirect target.
- 307 / 308
- Redirects that preserve the request method; 307 is temporary and 308 is permanent.
- Interim response
- A response sent while the request continues; it is not the final result.
- Retry-After
- A suggested wait before a follow-up request. It is not a guarantee the next attempt will work.
- Upstream server
- A second server the front server asks to help fulfill your request.
- Credentials
- Information sent to support a login or identity check.
- JSON
- A text format for values, lists and named values.
- IANA registry
- The official list of assigned numbers and their defining documents.
- method
- The action a client asks a server to perform.
- GET
- The HTTP action asking for a current version of something at an address.
- PUT
- The HTTP action asking to create or replace the state at the target address.
- DELETE
- The HTTP action asking to remove the target address’s association with its current functionality.
- header field
- A named piece of information attached to a request or response.
- response content
- The data carried by the response, when that response permits content.
- origin
- The website authority identified by a scheme, host and port together.
- client
- The program that sends a request.
- server
- The program that handles a request and sends a response.
- Content-Type
- A field naming the format of the content.
- Content-Length
- A field that reports a content length in bytes under HTTP’s message rules.
- Expect
- A request field describing an expectation the server should handle.
- authentication
- Checking evidence presented for an identity or access credential.
- authorization
- Deciding whether a requested action is allowed.
- cache
- A store of responses that may be reused under the applicable rules.
- preload
- Ask the browser to fetch a resource early because it is expected to be useful soon.
- status code
- The three-digit number in an HTTP reply that reports what happened to a request.
- permission
- Whether a particular action on something is allowed.
- authentication challenge
- A reply describing how a client can supply suitable login evidence.
- WWW-Authenticate
- A response field describing an available authentication method.
- ETag
- A version label the server assigns to particular content.
- precondition
- A condition that must be checked before an action is applied.
- If-Match
- A request field saying: apply this action only if the current version matches this label.
- If-None-Match
- A request field asking the server to proceed only when none of the listed version labels match.
- byte range
- A chosen slice of a file, addressed by numbered byte positions.
- Content-Range
- A response field telling where a returned slice belongs in the complete content.
- gateway
- A server that receives a request and uses another server to help answer it.
- rate limit
- A server’s rule limiting how many requests it accepts over time.
- syntax
- The punctuation and arrangement that make a message readable in its format.
- HEAD
- An HTTP read asking for response information without response content.
- POST
- An HTTP action asking a resource to process submitted information.
Rules & examples
A status code reports what happened to one request. The cause tells you what to do next.
- 1xx is informational, 2xx successful, 3xx redirection, 4xx client error, and 5xx server error.
- 201 indicates creation; 202 means accepted for processing, without promising completion; 204 has no content.
- 303 directs retrieval elsewhere. 307 and 308 preserve the method; 301 and 302 allow a historical POST-to-GET change.
These offline stories hold server policies explicit. 202 is not a completed job, 304 has no response content, 403 does not prove a known identity, and no HTTP reply is not a 500. Never blindly retry an unsafe request.
Predict: Does every 3xx response tell the browser to visit another address?
Check your answer
No. 304 validates a stored response; it does not redirect to another page.
Sources
New to this? Start hereA quick picture + helpful background
A request starts a conversation.
A client asks for a resource. A server sends a response. The method, address, headers, and status explain what that conversation means.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.