Every time you open a website, sign into an application, or send a request to an API, a server responds with a small but powerful message: an HTTP status code.
Most developers encounter these codes every day.
But behind every number is a story about what happened between the client and the server.
HTTP status codes are part of a standardized response system defined by RFC 9110. They help applications understand whether a request succeeded, needs attention, or failed.
The HTTP Status Code Families
🟢 2xx — Success
The request was received, understood, and completed successfully.
Examples:
200 OK — The request succeeded.
201 Created — A new resource was successfully created.
These responses tell the client: everything worked as expected.
🔵 3xx — Redirection
The requested resource requires an additional step.
These responses help clients find another location or use a different version of a resource.
Examples include redirects and cache-related responses.
🟠4xx — Client Errors
Something is wrong with the request sent by the client.
Common examples:
400 Bad Request — The request format is invalid.
401 Unauthorized — Authentication is required.
403 Forbidden — The client does not have permission.
404 Not Found — The requested resource does not exist.
In simple terms: the problem is usually on the client side.
🔴 5xx — Server Errors
The request was valid, but the server failed while processing it.
Example:
500 Internal Server Error — An unexpected error occurred on the server.
These responses indicate problems within the server or its internal systems.
Why HTTP Status Codes Matter
HTTP status codes are not just numbers.
They are:
The language of web communication
Essential signals for API behavior
Valuable tools for debugging and monitoring
A foundation of backend engineering and distributed systems
Understanding status codes helps developers build better applications, diagnose problems faster, and design more reliable systems.
A single three-digit number can reveal what happened during a conversation between a client and a server.
Top comments (0)