HTTP Status Codes Reference
Complete reference of HTTP response status codes with descriptions and common use cases.
About HTTP Status Codes
HTTP status codes are standardized three-digit response codes that web servers return to indicate the outcome of a client's request. Defined by RFC 9110 (which superseded RFC 7231), these codes are the universal communication mechanism between web browsers, API clients, and servers. Understanding HTTP status codes is fundamental to web development, API design, and SEO -- every developer must know the difference between a 301 (permanent redirect that transfers SEO value) and a 302 (temporary redirect that does not), or between a 401 (authentication required) and a 403 (access forbidden regardless of credentials).
HTTP Status Code Categories
Status codes are grouped into five classes. 1xx (Informational) indicates the request was received and processing continues -- 101 is used for WebSocket upgrades, and 103 Early Hints enables preloading resources. 2xx (Success) means the request was successfully processed -- 200 OK is the standard success response, 201 Created confirms resource creation (common after POST), and 204 No Content is used for successful DELETE operations. 3xx (Redirection) indicates the client must take additional action -- 301 and 308 are permanent redirects, while 302 and 307 are temporary.
4xx (Client Error) signals problems with the request itself -- 400 Bad Request for malformed syntax, 404 Not Found for missing resources, 422 Unprocessable Entity for validation failures, and 429 Too Many Requests for rate limiting. 5xx (Server Error) indicates the server failed to fulfill a valid request -- 500 Internal Server Error is the generic catch-all, 502 Bad Gateway occurs when a reverse proxy receives an invalid upstream response, and 503 Service Unavailable indicates temporary downtime for maintenance or overload. For REST APIs, consistent and meaningful use of status codes is a key part of API design best practices.
Frequently Asked Questions
What are HTTP status codes?
HTTP status codes are 3-digit numbers returned by web servers to indicate the result of a client request. They are grouped into 5 classes: 1xx (informational), 2xx (success), 3xx (redirection), 4xx (client errors), and 5xx (server errors).
What is the difference between 401 and 403?
401 Unauthorized means the request lacks valid authentication credentials — logging in might fix it. 403 Forbidden means the server understood your identity but you do not have permission to access the resource — re-authenticating will not help.
What is the difference between 301 and 302?
301 is a permanent redirect — search engines transfer SEO value to the new URL. 302 is a temporary redirect — search engines keep the original URL indexed. Use 301 for permanent URL changes and 302 for temporary ones.