What Are HTTP Status Codes?
HTTP status codes are three-digit numbers returned by a web server in response to a client's request. They indicate whether the request was successful, redirected, resulted in a client error, or caused a server error. Status codes are grouped into five categories: 1xx (Informational), 2xx (Success), 3xx (Redirection), 4xx (Client Error), and 5xx (Server Error). Understanding these codes is essential for web developers, API designers, and system administrators who need to build, debug, and monitor web applications and services.
How to Use the HTTP Status Code Reference
- 1Browse the complete list of HTTP status codes organized by category (1xx through 5xx).
- 2Use the search field to filter codes by number, name, or description — for example, type '404' or 'redirect'.
- 3Each status code shows its numeric code, official name, and a concise description of when and how it is used.
- 4Color-coded categories make it easy to distinguish between success (green), redirection (yellow), client errors (orange), and server errors (red).
- 5Use this reference while debugging API responses, configuring web servers, or writing error handling logic.
Common Use Cases
API Development
Choose the correct status codes when designing REST API responses — knowing when to use 201 vs 200, or 400 vs 422, leads to better APIs.
Debugging HTTP Errors
When an API returns an unexpected status code, quickly look up its meaning to understand whether the issue is client-side or server-side.
SEO & Redirects
Understand the difference between 301 (permanent) and 302 (temporary) redirects and their impact on search engine optimization.
Error Page Design
Reference the correct codes when implementing custom error pages for 404, 403, 500, and other common error scenarios.
Frequently asked questions
What is the difference between 401 and 403?
401 Unauthorized means the request lacks valid authentication credentials — the user needs to log in. 403 Forbidden means the server understood the request and the user may be authenticated, but they don't have permission to access the resource.
When should I use 200 vs 201 vs 204?
Use 200 OK for successful GET requests and general success. Use 201 Created after a successful POST that creates a new resource. Use 204 No Content for successful requests that don't return a body, such as DELETE operations.
What is the difference between 301 and 308 redirects?
Both are permanent redirects. 301 allows the client to change the HTTP method (e.g., POST may become GET). 308 requires the client to preserve the original HTTP method. For most website redirects, 301 is standard; 308 is used when method preservation is critical.