A HTTP status code is how a web server, serving content, communicates the status of that content to the client1.
Status codes are grouped in blocks of 100 so that different types of statuses can be easily inferred. There are currently 5 blocks or categories:
Only some numbers in a block have a industry standard meaning. This is useful for edge and content delivery networks to more accurately debug customer issues.
An informational response is issued provisionally to let the client know how a request is being processed and that the client needs to wait for a final response.
I don't see these often in the wild.
A successful response is the "happy path" of the internet. For the most part you want your responses to be in the 2xx category2
This is the standard response for when a request is delivered successfully. The majority of status codes are going to be a 200 OK.
This category defines how a client should redirect a request based on other information sent from the server.
This category means that a request was made from the client that was malformed or incorrect.
This doesn't mean the user did something wrong (although that's possible too), it just means that the request as the server received it was not a request the server could process on the user's behalf.
This is a common response status code that means the client requested a page or asset that the server didn't have.
In my experience, the majority of the time that this happens is due to a typo on the content creator's part or a URL was modified by the user and it wasn't the correct URL.
This category is all about an error on the server, even if the request from the client was correct.
This could be because of a bug based on a case the developer didn't think about during development, overload on the server or a server it's making requests from or a configuration issue.
The server is a proxy or gateway to an upstream but the service it's supposed to serve responded with an invalid response.
The server is available but was unable to respond.
client can be a browser or another web server. The internet is a collection of servers, often many, stitched together to serve content. A server will often use the status code it receives from another server to determine what status code to send to the client, sometimes modifying it slightly to differentiate between the status the server received and the status the server sent. ↩
Generally you want 2xx responses, but 3xx responses can be useful for "healing" of a broken URL. ↩
Published on 2022-10-28