What Is A HTTP Status Code?

What Is A HTTP Status Code

Date First Published: 12th April 2022

Topic: Computer Networking

Article Type: Computer Terms & Definitions

Difficulty: Medium

Subtopic: Network Identifiers

Difficulty Level: 5/10

Learn more about what a HTTP status code is in this article.

A HTTP status code is a three-digit code that identifies the status of a HTTP request on the World Wide Web. For example, the HTTP status code 404 means that the requested page cannot be found. The official registry of HTTP status codes is maintained by IANA and all HTTP status codes are divided into five categories, with the first digit identifying the category of the HTTP status code.

The categories include:

  • 1xx – Informational. The request was received and the information is being processed.
  • 2xx – Successful. The request was successfully received and accepted.
  • 3xx – Redirection. Further action needs to be taken in order for the request to be completed.
  • 4xx – Client error. The request cannot be processed due to an error on the client-side, such as the page being restricted or not being found.
  • 5xx – Server error. The request cannot be processed due to an error on the server-side, such as the server being unable to handle the request. It is usually caused by errors in Htaccess or PHP files.

List Of HTTP Status Codes

This table contains the list of all HTTP status codes by category.

1xx - Informational

Status Code Name Description
100 Continue Indication of everything so far being okay. The request has only been partially received by the server and the client should continue with the request as long as it has not been denied.
101 Switching Protocols The server switches protocols. It indicates that the TCP connection is about to be used for a different protocol.
102 Processing The server has accepted the request but has not processed it yet.
103 Early Hints Designed to allow the user to preload resources whilst the server prepares a response.

2xx - Success

Status Code Name Description
200 Okay Indicates a successful request with no errors.
201 Created The request is complete and a new resource has been created.
202 Accepted The request is accepted for processing, but the processing has not been completed.
203 Non-authoritative Information The request is successful, but the enclosed payload has been altered by a transforming proxy.
204 No Content The request has been successfully processed by the server, but no content is being returned.
205 Reset Content The request has been successfully processed by the server, but no content is being returned. However, this status code indicates that the browser needs to reset the document view, such as clearing the contents of a form.
206 Partial Content The request is successful and the server is returning partial data of the size requested in response to the range header of a request.
207 Multi-status This status code contains a number of separate resource codes in situations where multiple resource codes are appropriate.
208 Already reported A status code used inside the response element DAV (propstat) in order to avoid listing the internal members of several bindings to the exact same collection over and over again.
226 IM Used The server has completed a GET request for the resource and the resource represents the result of one or more instance-manipulations that are applied to the current instance.

3xx - Redirection

Status Code Name Description
300 Multiple Choices Indicates that the request has multiple responses and the client must choose one. It is a link list where the user can select a link and go to that location.
301 Moved Permanently The requested page has been moved to a new URL.
302 Found The requested page has been temporarily moved to a new URL.
303 See Other The requested page is available at a different URL. It gives the client instructions to issue a GET request on the new URL.
304 Not Modified The requested page has not been modified since the last time it was accessed. It is used for caching purposes, which eliminates the need for the same information to be downloaded from the web server over and over again.
305 Use Proxy The requested page must be accessed through a proxy.
306 Switch Proxy This HTTP status code is no longer used. Originally, it meant that future requests should use the specified proxy.
307 Temporary Redirect Has similar behaviour to status code 302. The requested page has been temporarily moved to a new URL. It means that the redirect is temporary and future requests should still use the original URL.
308 Permanent Redirect Has similar behaviour to status code 301. The requested page has been moved to a new URL. It means that all future requests must use the new URL.

4xx - Client errors

Status Code Name Description
400 Bad request The server was unable to process the request sent from the browser due to an error on the client-side, such as size too large or invalid request syntax.
401 Unauthorised The requested page requires authorisation and is not accessible without a username and password.
402 Payment Required This HTTP status code is reserved for future use. It might be used when an account does not have sufficient funds to perform an action.
403 Forbidden The server understood the request, but access is denied to the requested page due to permission errors.
404 Not Found The requested page cannot be found on the server.
405 Method Not Acceptable The server does not allow the request method used for the resource.
406 Not Acceptable The client has requested a response using accept headers that the server is unable to fulfil.
407 Proxy Authentication Required The client must authenticate with a proxy server before the request is fulfilled.
408 Request Timeout The client made a request that took longer than the server was prepared to wait
409 Conflict The request could not be processed by the server due to a conflict related to the page.
410 Gone The requested page is no longer available, never going to return, and has no redirect.
411 Length Required The 'content-length' was not specified, causing the server to not accept the request.
412 Precondition Failed The server failed to meet one of the preconditions that the requester put in the request header fields.
413 Payload Too Large The request is larger than the server can handle.
414 Request URL Too Long The server denied the request because the URL was too long for it to process.
415 Unsupported Media Type The server denied the request because the media type was unsupported.
416 Range Not Satisfiable The client requested a byte range, but that range is unavailable and the server cannot supply it.
417 Expectation Failed The expectation that was provided in an Expect request-header field could not be met by the server.
421 Misdirected Request The request was directed at a server that was unable to produce a response.
422 Unprocessable Entity The server could not process the instructions of a well-formed request.
423 Locked The requested resource was locked.
424 Failed Dependency The client's request failed because it depended on another request that had previously failed.
425 Too Early The server is unwilling to process a request that might be replayed.
426 Upgrade Required The server refused to handle the request using the current protocol, but will accept the request after the client upgrades to a different protocol.
428 Precondition Required The server requires the request to be conditional.
429 Too Many Requests The client has sent too many requests in a given period of time.
431 Request Header Fields Too Large The server refused to fulfil the client requests because the HTTP headers are too large.
451 Unavailable For Legal Reasons The client is denied access to a page due to legal reasons, such as a webpage censored by the government.

5xx - Server errors

Status Code Name Description
500 Internal Server Error The server encountered something unexpected that prevented it from displaying the page.
501 Not Implemented The server does not have the facilities or capabilities to handle the request.
502 Bad Gateway The server acting as a gateway received an invalid response from the upstream server whilst trying to fulfil the request.
503 Service Unavailable The request was not completed due to the server being temporarily down, usually due to it being overloaded or maintenance.
504 Gateway Timeout The server acting as a gateway ran out of time to wait for a server response.
505 HTTP Version Not Supported The server does not support the HTTP version used in the request.
508 Loop Detected An infinite loop was detected by the server whilst processing the request.
510 Not Extended Additional extensions are required in order for the server to fulfil the request.
511 Network Authentication Required The client needs to authenticate in order to gain network access.


Feedback

  • Is there anything that you disagree with on this page?
  • Are there any spelling, grammatical, or punctuation errors on this page?
  • Are there any broken links or design errors on this page?

If so, it is important that you tell me as soon as possible on this page.