HTTP Status Codes Reference
Search the status codes you meet in browsers, APIs and server logs, with what each one really means.
| Code | Name | Meaning | Class |
|---|---|---|---|
| 100 | Continue | The server received the request headers and the client should send the body. | Informational |
| 101 | Switching Protocols | The server is switching protocols as requested, for example to WebSocket. | Informational |
| 200 | OK | The request succeeded. | Success |
| 201 | Created | The request succeeded and a new resource was created. | Success |
| 202 | Accepted | The request was accepted for processing but is not finished. | Success |
| 204 | No Content | Success with no response body, common for DELETE and some PUT requests. | Success |
| 206 | Partial Content | The server is returning part of the resource, used for range requests and resumable downloads. | Success |
| 301 | Moved Permanently | The resource has a new permanent URL. Search engines transfer ranking to the new address. | Redirection |
| 302 | Found | Temporary redirect. The client should keep using the original URL. | Redirection |
| 303 | See Other | Redirect to another resource using GET, typically after a POST. | Redirection |
| 304 | Not Modified | The cached copy is still valid, so no body is sent. | Redirection |
| 307 | Temporary Redirect | Like 302 but the method and body must not change. | Redirection |
| 308 | Permanent Redirect | Like 301 but the method and body must not change. | Redirection |
| 400 | Bad Request | The server could not understand the request because of malformed syntax or invalid data. | Client error |
| 401 | Unauthorized | Authentication is required or has failed. | Client error |
| 403 | Forbidden | The server understood the request but refuses to authorise it. | Client error |
| 404 | Not Found | The requested resource does not exist. | Client error |
| 405 | Method Not Allowed | The HTTP method is not supported for this resource. | Client error |
| 406 | Not Acceptable | The server cannot produce a response matching the Accept headers. | Client error |
| 408 | Request Timeout | The server timed out waiting for the request. | Client error |
| 409 | Conflict | The request conflicts with the current state of the resource. | Client error |
| 410 | Gone | The resource existed but has been permanently removed. | Client error |
| 413 | Payload Too Large | The request body is larger than the server allows. | Client error |
| 414 | URI Too Long | The URL is longer than the server will process. | Client error |
| 415 | Unsupported Media Type | The request body format is not supported. | Client error |
| 418 | I'm a teapot | An April Fools' joke from RFC 2324 that some servers implement for fun. | Client error |
| 422 | Unprocessable Content | The request was well-formed but contained semantic errors, common for validation failures. | Client error |
| 429 | Too Many Requests | The client has sent too many requests and is being rate limited. | Client error |
| 431 | Request Header Fields Too Large | The headers are too large for the server. | Client error |
| 451 | Unavailable For Legal Reasons | Access is denied for legal reasons. | Client error |
| 500 | Internal Server Error | A generic server error; something went wrong that the server could not handle. | Server error |
| 501 | Not Implemented | The server does not support the functionality required for the request. | Server error |
| 502 | Bad Gateway | A gateway or proxy received an invalid response from the upstream server. | Server error |
| 503 | Service Unavailable | The server is overloaded or down for maintenance. | Server error |
| 504 | Gateway Timeout | A gateway or proxy did not receive a timely response from the upstream server. | Server error |
How it works
Status codes are grouped by their first digit: 1xx informational, 2xx success, 3xx redirection, 4xx the client made a mistake, and 5xx the server failed. Choosing the right code matters for APIs and for SEO: use 301 for permanent moves, 410 for removed content, and 503 with a Retry-After header for planned downtime.
Frequently asked questions
What is the difference between 401 and 403?
401 means you are not authenticated (no or invalid credentials). 403 means you are authenticated but not permitted to access the resource.
301 or 302 for a redirect?
Use 301 when the move is permanent and you want search engines to transfer ranking; use 302 or 307 for temporary redirects.
What does 502 Bad Gateway mean?
A proxy or load balancer received an invalid response from the application server behind it, which often means the app crashed or is unreachable.