HTTP Status Codes

Contents


In HTTP, special indicators are provided for status codes, which are registered by IANA. These status codes are inserted by a server in each header of an HTTP response. If the requested resource cannot or may not be transmitted directly, an automatically generated HTML page is also transmitted, which usually contains the error code and further information.

Overview

CodeText / Meaning
100Continue
101Switching Protocols
102Processing
103Early Hints
200OK
201Created
202Accepted
203Non-Authoritative Information
204No Content
205Reset Content
206Partial Content
207Multi-Status
208Already Reported
226IM Used
300Multiple Choices
301Moved Permanently
302Moved Temporarily
303See Other
304Not Modified
305Use Proxy
306Reserved
307Temporary Redirect
308Permanent Redirect
400Bad Request
401Unauthorized
402Payment Required
403Forbidden
404Not Found
405Method Not Allowed
406Not Acceptable
407Proxy Authentication Required
408Request Timeout
409Conflict
410Gone
411Length Required
412Precondition Failed
413Request Entity Too Large
414Request-URI Too Long
415Unsupported Media Type
416Requested Range Not Satisfiable
417Expectation Failed
418Unused
421Misdirected Request
422Unprocessable Entity
423Locked
424Failed Dependency
425Too Early
426Upgrade Required
429Too Many Requests
431Request Header Fields Too Large
451Unavailable For Legal Reasons
500Internal Server Error
501Not Implemented
502Bad Gateway
503Service Unavailable
504Gateway Timeout
505HTTP Version Not Supported
506Variant Also Negotiates
507Insufficient Storage
508Loop Detected
510Not Extended
511Network Authentication Required

Class 1xx: INFORMATIONAL

This class is reserved for provisional answers.

100 - Continue
The server has received the request correctly and is waiting for further instructions from the client to be able to execute the request. (Not currently used)
101 - Switching Protocols
The server has received the request correctly and will change the transfer protocol after sending this status message in accordance with the client's instructions for executing the request. (Not currently used)
102 - Processing
Used to avoid a timeout while the server is processing a time-intensive request.
103 - Early Hints
Indicates to the client that the server is likely to send a final response with the header fields contained in the information response. (RFC 8297)

Class 2xx: SUCCESSFUL

The 2xx class indicates that the client's request has been received, understood and accepted by the server.

200 - OK
The request reached the server correctly and was executed correctly.
201 - Created
The request reached the server correctly and the requested resource was recreated. This is the case if the request from the browser to the server was made using one of the HTTP transfer methods POST or PUT and contained an instruction to create the corresponding object.
202 - Accepted
The server has accepted the browser's request but does not provide any data in response. Instead of sending the data, the server writes it to a file and indicates in the message where the data can be found later. This message says nothing about whether the server can handle the request successfully. It has simply accepted it and postponed processing to a later time.
203 - Non-Authoritative Information
This status code should be returned by a server instead of code 200 if it is not the original server, but a proxy server, for example. In this way, the web browser learns that the data was sent successfully, but does not come from the original server and therefore there is no guarantee that it is up to date.
204 - No Content
The server has received the request but is not sending any data back. This status code is useful when used in CGI scripts that do something on the server but do not want to send new HTML code to the calling browser. From the user's point of view, the old screen content is retained.
205 - Reset Content
The request reached the server correctly and was processed. With this response, the requesting client is asked to delete the document view that triggered the request for this resource (e.g. an entry in a form field).
206 - Partial Content
The GET request contained the line "range" in the HTTP header, which prompts the server to transmit only a certain range of the requested resource. This request reached the server correctly and was processed. The requested data is sent in several portions (this has nothing to do with TCP/IP packets, but happens at HTTP protocol level). Information on "content-length" (e.g.: 1024) and "content-range" (e.g.: bytes 0-1023/1024) is used to specify how many bytes of the requested content are delivered and which part of the total data.
207 - Multi-Status
The response contains an XML document that contains several status codes for operations performed independently of each other.
208 - Already Reported
This status code is used to avoid enumerating internal members of multiple bindings to the same collection.
226 - IM Used
The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.

Class 3xx: REDIRECTION

The 3xx class indicates that the request was received correctly, but that the user should make changes to the request for the resource.

300 - Multiple Choices
The requested data is available under several different URIs (mirror). Instead of the data, the available URIs are transferred as a list. The web browser can then let the user select a URI in a dialog.
301 - Moved Permanently
The requested data is no longer located under the URI, it has been permanently moved to a different address. The status message indicates under which URI the data is now located. A web browser that receives this response from the server can immediately request the new address, for example.
302 - Moved Temporarily
The requested data has been temporarily moved to another URI. The status message indicates the address where the data is currently located. A web browser that receives this response can, for example, immediately request the temporarily valid address.
303 - See Other
Die angeforderten Daten sind unter einem angegebenen URI verfügbar und sollte von dort mit Hilfe der get-Methode angefordert werden. Dieser Statuscode ist für CGI-Scripts gedacht, die mit der post-Methode aufgerufen wurden und den Browser auf eine andere Ressource lenken wollen, die mit der get-Methode angefordert werden soll.
304 - Not Modified
The requested data is available under a specified URI and should be requested from there using the get method. This status code is intended for CGI scripts that were called with the post method and want to direct the browser to another resource that is to be requested with the get method.
305 - Use Proxy
The requested resource can only be sent via a proxy that is explicitly specified in the response in the "location" field.
306 - Reserved
(Currently not in use)
307 - Temporary Redirect
The requested data has been temporarily moved to another URI. Like the status code 302 (Moved Temporarily). The request method is not allowed to be changed for the new request.
308 - Permanent Redirect
The requested data is no longer located under the URI, it has been permanently moved to a different address. Like the status code 301 (Moved Permanently). The request method is not allowed to be changed for the new request.

Class 4xx: CLIENT ERROR

The 4xx class stands for all messages about errors that are probably triggered by the requesting client.

400 - Bad Request
The request contains syntax errors. The server is therefore unable to process the request. This can happen, for example, if the request was made because a user tried to enter a URI manually in the address line of the browser and used invalid characters.
401 - Unauthorized
The requested data is access-protected. The server can only send the data if a valid access ID, consisting of user name and password, is sent with the request. In practice, this always happens when an address is called up that is access-protected, e.g. by htaccess. After receiving this status code, the web browser then displays a dialog for entering the user name and password. It then starts a new request to the server with the data entered.
402 - Payment Required
The requested data is subject to a charge. The server can only send the data if a confirmation of payment for the data is sent with the request. This is not currently used due to a lack of standardized technical principles for micropayments.
403 - Forbidden
The requested data is restricted. The credentials provided to allow access are invalid. This can happen, for example, if status code 401 was returned previously, and the browser has now started the next request with the credentials it requested from the user in the dialog, but these credentials are invalid. Some web browsers will then repeat the credential input dialog two more times, and after the third incorrect input, the user will receive a "Forbidden" error message.
404 - Not Found
The requested URI does not exist. Alongside status codes 200 and 304, this is one of the most common cases in practice. It always occurs when a link leads to an address on the server that does not exist or no longer exists, or when the user has tried to call up an address on the server by manually typing it into the address line of the browser, but this address does not exist.
405 - Method Not Allowed
The specified transfer method is not permitted on the server. The data is therefore not transferred. This can occur, for example, if no method other than the get method is permitted in the configuration of the web server, but an HTML form contains a CGI call with the post method.
406 - Not Acceptable
The request is not acceptable in this form. The data will therefore not be transmitted.
407 - Proxy Authentication Required
The requesting client is a proxy server. The data is only transferred to this server if it identifies itself as a valid proxy server. This status code is not currently used. In the long term, this should establish similar handling to the 401 status code, but not for requesting browsers, but for requesting proxy servers. This could make it possible for web providers to block unwanted proxy servers from caching their own data in the server configuration.
408 - Request Timeout
The server has not received an expected request within the specified maximum time period. The connection to the requesting browser is therefore terminated. Requested data is not transmitted.
409 - Conflict
The server cannot send the requested data because a conflict has arisen with another process. This can happen, for example, if another process has just provided a requested file with exclusive file locking (no file access allowed for other processes).
410 - Gone
The requested resource is no longer available on the server and there is no known alternative address for the same resource. This status code is selected by server administrators, for example, if it was a temporary presentation.
411 - Length Required
The data is not sent. They can only be sent if the request contains a content-length specification. The browser can attempt to reformulate the request and transmit the length of the request data sent to the server.
412 - Precondition Failed
One or more of the conditions specified in the request do not apply. The requested data will therefore not be transmitted.
413 - Request Entity Too Large
The server refuses to process the request because the content of the request is larger than the server can or wants to process. The server can terminate the connection to the client to prevent the client from sending further requests.
414 - Request-URI Too Long
The server refuses to process the request because the URI of the request is longer than the server can interpret. This rare status message is used if, for example, a URL contains an overlong query sequence.
415 - Unsupported Media Type
The server refuses to process the request because the requested resource cannot be transferred in the format (mime type) requested in the request.
416 - Requested Range Not Satisfiable
The request contains information on which byte range of the requested URI is to be transferred. Both the start value and the end value of the specified range are outside the available byte range, e.g. if a byte range of 1000 to 2000 is specified, but the resource only has 500 bytes. The requested data is therefore not transferred.
417 - Expectation Failed
Used in connection with an "Expect" header field. The server behavior requested in the "Expect" header field cannot be fulfilled.
418 - Unused
RFC2324 was an April 1 RFC that lampooned the various ways HTTP was abused; one such abuse was the definition of an application-specific 418 status code, which has been deployed as a joke often enough for the code to be unusable for any future use.
421 - Misdirected Request
Indicates that the request was directed at a server that is unable or unwilling to produce an authoritative response for the target URI.
422 - Unprocessable Entity
Used if neither the return of status code 415 nor 400 would be justified, but processing of the request is rejected due to semantic errors, for example.
423 - Locked
The requested resource is currently locked.
424 - Failed Dependency
The request could not be carried out because it requires the success of a previous request.
425 - Too Early
Indicates that the server is unwilling to risk processing a request that might be replayed (used with HTTP Early Data).
426 - Upgrade Required
The client should switch to a different protocol specified in the Upgrade header.
429 - Too Many Requests
The client has sent too many requests in a certain period of time.
431 - Request Header Fields Too Large
Indicates that the server is unwilling to process the request because its header fields are too large.
451 - Unavailable For Legal Reasons
This status code indicates that the server is denying access to the resource as a consequence of a legal demand.

Class 5xx: SERVER ERROR

The 5xx class stands for temporary non-executability of the request or for errors that have occurred or are present in the server and make it impossible to execute the request.

500 - Internal Server Error
The server cannot send the requested data because an error has occurred on the server. For example, the called CGI script could not be started.
501 - Not Implemented
The server cannot process the request because it does not understand the nature of the request and does not know how to handle the requested resource.
502 - Bad Gateway
The server (used as a gateway or proxy) cannot process the request because it has received an error message when forwarding the request to a higher-level server.
503 - Service Unavailable
The server cannot process the request due to overload. The requested data can therefore not be sent. The status message can indicate the earliest time at which the request can be processed again. In contrast to status code 202, the server does not process the data as soon as it has capacity again.
504 - Gateway Timeout
If the server works as a gateway or proxy, it returns this status message to the client if it does not receive a response from a server that was addressed by the client via it within a specific time defined by the server administrator.
505 - HTTP Version Not Supported
The server does not support the HTTP version specified in the HTTP header of the request. The requested data is therefore not sent.
506 - Variant Also Negotiates
The content agreement of the request results in a circular reference. (RFC 2295)
507 - Insufficient Storage
The request cannot be executed by the server due to insufficient memory. (WebDAV, RFC 4918)
508 - Loop Detected
The server has detected an infinite loop while processing the request (is sent instead of error 208). (WebDAV, RFC 5842)
510 - Not Extended
Further additions to the request are required for the server to execute the request. (RFC 2774)
511 - Network Authentication Required
The client must authenticate itself in order to access the network. (RFC 6585)

Were the free content on my website helpful for you?
Support the further free publication with a donation via PayPal.

Read more about support options...