Table of Contents
HTTP status codes are standardized codes returned by servers in response to a client’s request made to the server. These codes help the client understand the result of the request and the status of the resource they requested. The status codes are grouped into five categories based on the type of response.
Related: HTTP vs HTTPS
HTTP Status Code: Categories
Here is a breakdown of these categories and some common status codes within each:
1xx: Informational
1xx codes specify that the request was received and understood, and the server is continuing the process.
- 100 Continue: The initial part of a request has been received and the client should continue with the rest of the request.
- 101 Switching Protocols: The server is switching protocols as requested by the client.
Related – Download HTTP Status Codes CheatSheet
2xx: Success
2xx codes specify that the request was successfully received, understood, and accepted.
- 200 OK: Request has succeeded. The information returned with the response.
- 201 Created: Request has been fulfilled and has resulted in the creation of a new resource.
- 204 No Content: Server not returning any content though the request has been successfully processed.
3xx: Redirection
3xx codes specify that further action needs to be taken by the client to complete the request.
- 301 Moved Permanently: Resource requested permanently moved to a new URL.
- 302 Found: Resource requested is temporarily located at a different URL.
- 304 Not Modified: Resource has not been modified since the last request.
4xx: Client Error
4xx codes specify that the request contains bad syntax or cannot be fulfilled.
- 400 Bad Request: Server cannot or will not process the request due to an apparent client error.
- 401 Unauthorized: Authentication is required and has failed/has not yet been provided.
- 403 Forbidden: Server understands the request but refuses to authorize it.
- 404 Not Found: Requested resource could not be found on the server.
- 408 Request Timeout: Server timed out while waiting for the request.
5xx: Server Error
5xx codes specify that the server failed to fulfil a valid request.
- 500 Internal Server Error: A generic error message indicating that the server encountered an unexpected condition.
- 501 Not Implemented: The server does not support the functionality required to fulfil the request.
- 502 Bad Gateway: Server (acting as a gateway or proxy) received an invalid response from the upstream server.
- 503 Service Unavailable: Server unable to handle the request currently due to temporary overloading/maintenance.
- 504 Gateway Timeout: Server (acting as a gateway or proxy) did not receive a timely response from the upstream server.
Related: Web Socket vs HTTP: What to choose for your next API Design
Complete List of HTTP Status Codes
Here’s a list of HTTP status codes in tabular form, categorized by their class (Informational, Success, Redirection, Client Error, and Server Error):
HTTP Status Code | Class | Description |
1xx | ||
100 | Informational | Continue |
101 | Informational | Switching Protocols |
102 | Informational | Processing (WebDAV) |
103 | Informational | Early Hints |
2xx | ||
200 | Success | OK |
201 | Success | Created |
202 | Success | Accepted |
203 | Success | Non-Authoritative Information |
204 | Success | No Content |
205 | Success | Reset Content |
206 | Success | Partial Content |
207 | Success | Multi-Status (WebDAV) |
208 | Success | Already Reported (WebDAV) |
226 | Success | IM Used |
3xx | ||
300 | Redirection | Multiple Choices |
301 | Redirection | Moved Permanently |
302 | Redirection | Found |
303 | Redirection | See Other |
304 | Redirection | Not Modified |
305 | Redirection | Use Proxy |
306 | Redirection | (Unused) |
307 | Redirection | Temporary Redirect |
308 | Redirection | Permanent Redirect |
4xx | ||
400 | Client Error | Bad Request |
401 | Client Error | Unauthorized |
402 | Client Error | Payment Required |
403 | Client Error | Forbidden |
404 | Client Error | Not Found |
405 | Client Error | Method Not Allowed |
406 | Client Error | Not Acceptable |
407 | Client Error | Proxy Authentication Required |
408 | Client Error | Request Timeout |
409 | Client Error | Conflict |
410 | Client Error | Gone |
411 | Client Error | Length Required |
412 | Client Error | Precondition Failed |
413 | Client Error | Payload Too Large |
414 | Client Error | URI Too Long |
415 | Client Error | Unsupported Media Type |
416 | Client Error | Range Not Satisfiable |
417 | Client Error | Expectation Failed |
418 | Client Error | I’m a teapot (RFC 2324) |
421 | Client Error | Misdirected Request |
422 | Client Error | Unprocessable Entity (WebDAV) |
423 | Client Error | Locked (WebDAV) |
424 | Client Error | Failed Dependency (WebDAV) |
425 | Client Error | Too Early |
426 | Client Error | Upgrade Required |
428 | Client Error | Precondition Required |
429 | Client Error | Too Many Requests |
431 | Client Error | Request Header Fields Too Large |
451 | Client Error | Unavailable For Legal Reasons |
5xx | ||
500 | Server Error | Internal Server Error |
501 | Server Error | Not Implemented |
502 | Server Error | Bad Gateway |
503 | Server Error | Service Unavailable |
504 | Server Error | Gateway Timeout |
505 | Server Error | HTTP Version Not Supported |
506 | Server Error | Variant Also Negotiates |
507 | Server Error | Insufficient Storage (WebDAV) |
508 | Server Error | Loop Detected (WebDAV) |
510 | Server Error | Not Extended |
511 | Server Error | Network Authentication Required |
These status codes are a crucial part of web communication, enabling the client and server to communicate effectively about the state and outcome of requests.
ABOUT THE AUTHOR
I am here to share my knowledge and experience in the field of networking with the goal being – “The more you share, the more you learn.”
I am a biotechnologist by qualification and a Network Enthusiast by interest. I developed interest in networking being in the company of a passionate Network Professional, my husband.
I am a strong believer of the fact that “learning is a constant process of discovering yourself.”
– Rashmi Bhardwaj (Author/Editor)