Front-end Tutorials

Front-end Tutorials

HTMLCSSSassJavaScriptReactJS
CMS Tutorials

CMS Tutorials

WordPress
Tutorials expand

HTML Status Code

Posted in HTML Tutorial
Updated on Nov 20, 2024
By Mari Selvan
👁️ 746 - Views
⏳ 4 mins
💬 1 Comment
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 CodeMessageExplanation
100ContinueUsed to indicate to the client that it can proceed with sending the remainder of the request.
101Switching ProtocolsUsed to indicate that the server is switching protocols as requested by the client.
102ProcessingUsed to indicate that the server has received and is processing the request, but it has not yet completed the process.
103CheckpointUsed 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 CodeMessageExplanation
200OKUsed to indicate that the client's request has been successfully received, understood, and processed by the server.
201CreatedUsed to indicate that a new resource has been successfully created as a result of a client's request.
202AcceptedUsed to indicate that the client's request has been accepted for processing, but the processing is not yet complete.
203Non-Authoritative InformationUsed to indicate that the server is providing a representation of the requested resource that may be from a third-party or non-origin server.
204No ContentUsed to indicate that the server has successfully processed the client's request, but there is no content to be returned in the response.
205Reset ContentUsed to instruct the client to reset the current document and clear any form fields or input values.
206Partial ContentUsed 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 CodeMessageExplanation
300Multiple ChoicesUsed to indicate that the requested resource has multiple choices available, and the client should choose one of them to proceed.
301Moved PermanentlyUsed to indicate that the requested resource has been permanently moved to a new location.
302FoundUsed to indicate that the requested resource has been temporarily moved to a different location.
303See OtherUsed to indicate that the client should retrieve the requested resource from a different location using a GET request.
304Not ModifiedUsed 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.
306Use ProxyUsed to indicate that the requested resource is available only through a proxy.
307Temporary RedirectUsed to indicate that the requested resource has been temporarily moved to a different location.
308Permanent RedirectUsed 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 CodeMessageExplanation
400Bad RequestUsed to indicate that the server cannot process the client's request due to malformed syntax or other client-side errors.
401UnauthorizedUsed to indicate that the client's request lacks valid authentication credentials for the requested resource.
402Payment RequiredUsed to indicate that the payment is required to access the requested resource.
403ForbiddenUsed to indicate that the client's request is understood by the server, but the server refuses to fulfill it.
404Not FoundUsed to indicate that the server cannot find the requested resource.
405Method Not AllowedUsed to indicate that the requested HTTP method is not allowed for the given resource.
406Not AcceptableUsed to indicate that the server cannot generate a response that satisfies the client's requested content requirements.
407Proxy Authentication RequiredUsed 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.
408Request TimeoutUsed to indicate that the server did not receive a complete request from the client within the server's specified timeout period.
409ConflictUsed to indicate a conflict between the client's request and the current state of the server.
410GoneUsed to indicate that the requested resource is no longer available on the server and will not be available again in the future.
411Length RequiredUsed to indicate that the server requires the "Content-Length" header to be included in the client's request.
412Precondition FailedUsed to indicate that one or more conditions specified in the client's request headers are not met by the server.
413Request Entity/Payload Too LargeUsed to indicate that the server refuses to process the request because the payload (e.g., request body) is too large.
414Request-URI Too LongUsed to indicate that the server cannot process the request because the URI (Uniform Resource Identifier) provided by the client is too long.
415Unsupported Media TypeUsed 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.
416Requested Range Not SatisfiableUsed to indicate that the server cannot fulfill the client's request because the requested range of a resource is not available or valid.
417Expectation FailedUsed 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 CodeMessageExplanation
500Internal Server ErrorUsed to indicate an unexpected condition occurred on the server that prevented it from fulfilling the client's request.
501Not ImplementedUsed to indicate that the server does not support the functionality required to fulfill the client's request.
502Bad GatewayUsed to indicate that the server acting as a gateway or proxy received an invalid response from an upstream server.
503Service UnavailableUsed to indicate that the server is temporarily unable to handle the client's request.
504Gateway TimeoutUsed to indicate that the server acting as a gateway or proxy did not receive a timely response from an upstream server.
505HTTP Version Not SupportedUsed to indicate that the server does not support the HTTP protocol version used in the client's request.
507Insufficient StorageUsed to indicate that the server is unable to store the representation needed to complete the client's request.
511Network Authentication RequiredUsed 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:

To get interesting news and instant updates on Front-End, Back-End, CMS and other Frameworks. Please Join the Telegram Channel:

Author

author
👋 Hey, I'm Mari Selvan

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

Share Your Findings to All

Subscribe
Notify of
guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Mari Selvan
Mari Selvan
1 year ago

If you have any doubts regarding this article (HTML Status Code) please comment here. I will help you immediately.

We make use of cookies to improve our user experience. By using this website, you agree with our Cookies Policy
AgreeCookie Policy