HTML Basic
HTML Entity
- HTML Entity
- HTML Alphabet Entity
- HTML Arrow Entity
- HTML Currency Entity
- HTML Math Entity
- HTML Number Entity
- HTML Punctuation Entity
- HTML Symbol Entity
HTML IndexedDB
HTML Reference
HTML Status Code
Photo Credit to CodeToFun
What is HTTP Status Code?
HTTP status codes are three-digit numeric codes that are returned by a web server in response to an HTTP request made by a client (such as a web browser).
These status codes provide information about the status of the request and the outcome of the server's attempt to fulfill it.
The HTTP status codes are grouped into different classes, each indicating a specific category of response.
The classes are defined by the first digit of the status code:
1xx - Informational
The request has been received and the server is continuing the process.
Status Code | Message | Explanation |
---|---|---|
100 | Continue | Used to indicate to the client that it can proceed with sending the remainder of the request. |
101 | Switching Protocols | Used to indicate that the server is switching protocols as requested by the client. |
102 | Processing | Used to indicate that the server has received and is processing the request, but it has not yet completed the process. |
103 | Checkpoint | Used to provide the client with some hints or headers before sending the final response. |
2xx - Success
The request was successfully received, understood, and processed by the server.
Status Code | Message | Explanation |
---|---|---|
200 | OK | Used to indicate that the client's request has been successfully received, understood, and processed by the server. |
201 | Created | Used to indicate that a new resource has been successfully created as a result of a client's request. |
202 | Accepted | Used to indicate that the client's request has been accepted for processing, but the processing is not yet complete. |
203 | Non-Authoritative Information | Used to indicate that the server is providing a representation of the requested resource that may be from a third-party or non-origin server. |
204 | No Content | Used to indicate that the server has successfully processed the client's request, but there is no content to be returned in the response. |
205 | Reset Content | Used to instruct the client to reset the current document and clear any form fields or input values. |
206 | Partial Content | Used to indicate that the server has successfully fulfilled a partial GET request from the client. |
3xx - Redirection
The client needs to take additional action to complete the request.
Status Code | Message | Explanation |
---|---|---|
300 | Multiple Choices | Used to indicate that the requested resource has multiple choices available, and the client should choose one of them to proceed. |
301 | Moved Permanently | Used to indicate that the requested resource has been permanently moved to a new location. |
302 | Found | Used to indicate that the requested resource has been temporarily moved to a different location. |
303 | See Other | Used to indicate that the client should retrieve the requested resource from a different location using a GET request. |
304 | Not Modified | Used to indicate that the requested resource has not been modified since the client's last request, and the client can use its cached version of the resource. |
306 | Use Proxy | Used to indicate that the requested resource is available only through a proxy. |
307 | Temporary Redirect | Used to indicate that the requested resource has been temporarily moved to a different location. |
308 | Permanent Redirect | Used to indicate that the requested resource has been permanently moved to a different location. |
4xx - Client Error
The request contains incorrect syntax or cannot be fulfilled by the server due to client error.
Status Code | Message | Explanation |
---|---|---|
400 | Bad Request | Used to indicate that the server cannot process the client's request due to malformed syntax or other client-side errors. |
401 | Unauthorized | Used to indicate that the client's request lacks valid authentication credentials for the requested resource. |
402 | Payment Required | Used to indicate that the payment is required to access the requested resource. |
403 | Forbidden | Used to indicate that the client's request is understood by the server, but the server refuses to fulfill it. |
404 | Not Found | Used to indicate that the server cannot find the requested resource. |
405 | Method Not Allowed | Used to indicate that the requested HTTP method is not allowed for the given resource. |
406 | Not Acceptable | Used to indicate that the server cannot generate a response that satisfies the client's requested content requirements. |
407 | Proxy Authentication Required | Used to indicate that the client must authenticate itself with a proxy server before making the requested request. It is part of the HTTP 4xx status code class. |
408 | Request Timeout | Used to indicate that the server did not receive a complete request from the client within the server's specified timeout period. |
409 | Conflict | Used to indicate a conflict between the client's request and the current state of the server. |
410 | Gone | Used to indicate that the requested resource is no longer available on the server and will not be available again in the future. |
411 | Length Required | Used to indicate that the server requires the "Content-Length" header to be included in the client's request. |
412 | Precondition Failed | Used to indicate that one or more conditions specified in the client's request headers are not met by the server. |
413 | Request Entity/Payload Too Large | Used to indicate that the server refuses to process the request because the payload (e.g., request body) is too large. |
414 | Request-URI Too Long | Used to indicate that the server cannot process the request because the URI (Uniform Resource Identifier) provided by the client is too long. |
415 | Unsupported Media Type | Used to indicate that the server refuses to accept the request because the media type of the request entity (e.g., request body) is not supported or not acceptable. |
416 | Requested Range Not Satisfiable | Used to indicate that the server cannot fulfill the client's request because the requested range of a resource is not available or valid. |
417 | Expectation Failed | Used to indicate that the server cannot meet the expectations specified in the "Expect" request header field. |
5xx - Server Error
The server encountered an error while processing the request.
Status Code | Message | Explanation |
---|---|---|
500 | Internal Server Error | Used to indicate an unexpected condition occurred on the server that prevented it from fulfilling the client's request. |
501 | Not Implemented | Used to indicate that the server does not support the functionality required to fulfill the client's request. |
502 | Bad Gateway | Used to indicate that the server acting as a gateway or proxy received an invalid response from an upstream server. |
503 | Service Unavailable | Used to indicate that the server is temporarily unable to handle the client's request. |
504 | Gateway Timeout | Used to indicate that the server acting as a gateway or proxy did not receive a timely response from an upstream server. |
505 | HTTP Version Not Supported | Used to indicate that the server does not support the HTTP protocol version used in the client's request. |
507 | Insufficient Storage | Used to indicate that the server is unable to store the representation needed to complete the client's request. |
511 | Network Authentication Required | Used to indicate that the client must authenticate itself to gain network access. |
These status codes are an essential part of the HTTP protocol and are used to communicate the outcome of a request between the client and the server.
They provide valuable information for developers, allowing them to handle different scenarios and troubleshoot issues when interacting with web servers.
👨💻 Join our Community:
Author
For over eight years, I worked as a full-stack web developer. Now, I have chosen my profession as a full-time blogger at codetofun.com.
Buy me a coffee to make codetofun.com free for everyone.
Buy me a Coffee
If you have any doubts regarding this article (HTML Status Code) please comment here. I will help you immediately.