HTTP Response Codes

When a user agent (a browser such as Firefox or Internet Explorer, or a search engine) makes a request to a web server, the responding web server sends a response code to the user agent. The codes you are most likely to encounter are 403 and 404. Actually, the most common code received is 200, but in that case you will not see the code, just the requested page.

Code Title Purpose
1xx Informational: Pertains to the status of the request.
100 Continue Server acknowledges a partial request and tells user agent to continue with request.
101 Switching Protocols The server understands and is willing to comply with the client's request, via the Upgrade message header field for a change in the application protocol being used on this connection. An example might be to switch from HTTP to FTP.
2xx Success: Request fulfilled, possibly with conditions
200 OK Successful request. The requested information—usually a web page—accompanies the response code.
201 Created The request has been fulfilled and resulted in a new resource being created. The URI of the resource is attached.
202 Accepted Essentially a noncommittal response. Status of the request may be attached.
203 Non-Authoritative Information The returned metainformation in the entity-header is not the definitive set as available from the origin server, but is gathered from a local or a third-party copy.
204 No Content Server fulfilled the request but no information is returned. User agent should not change its view.
205 Reset Content The server has fulfilled the request and the user agent should reset the document view which caused the request to be sent. An example may be the return information from a submitted form on a web page.
206 Partial Content The server is returning content in request to a range request from the user agent (part of a requested page). Used for cache control by the user agent.
3xx Redirection
300 Multiple Choices The server notifies the user agent that there are multiple choices for the requested resource, and attaches a list of the requested pages, from which the user agent can choose.
301 Moved Permanently The requested resource has been assigned a new permanent URI and any future references to this resource should use one of the returned URIs. An example would be that a search engine should update its links to the page. The new URI should be attached to the response.
302 Found The requested resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client should continue to use the Request-URI for future requests. Used when a page has been temporarily moved.
303 See Other The response to the request can be found under a different URI and should be retrieved using a from that resource.
304 Not Modified Server notifies the client that the page has not been modified since the requested date. Used when a client performs a conditional request, such as “Send me the page IF it has been modified since such-and-such a date.”
305 Use Proxy The requested resource must be accessed through the proxy given by the Location field, which is included.
306   Not used.
307 Temporary Redirect The requested resource resides temporarily under a different URI. The temporary URI is attached.
4xx Client error
400 Bad Request The server does not understand the request.
401 Unauthorized The request requires authorization. Usually means a user name and password is required. The client may repeat the request with a user name and password included.
402 Payment Required Not currently used.
403 Forbidden The server understood the request, but refuses to fulfill it. This occurs most often when a client requests a directory listing of a particular directory, but the server has been instructed to deny directory listings. The 403 code is often used to prevent “hot-linking” (i.e., a request for an image from one website to be displayed on a web page at another website).
404 Not Found The server could not find a page at the requested URI. The 404 code may also be used to flatly deny a request without providing a reason for the denial.
405 Method Not Allowed The method specified in the request is not allowed for the resource identified in the request.
406 Not Acceptable The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request. For example, the requested resource might be a Microsoft PowerPoint document, when the user agent requested an HTML page.
407 Proxy Authentication Required This code is similar to 401 Unauthorized, but indicates that the client must first authenticate itself with the proxy.
408 Request Timeout The client did not produce a request within the time that the server was prepared to wait. The client may repeat the request without modifications at any later time.
409 Conflict The server cannot complete the request due to a conflict with the current state of the resource. An example could be a case where a file on the server is locked for editing by another user.
410 Gone The requested resource is no longer available on the server and no forwarding address is known. The condition should be regarded as permanent. Clients such as search engines should delete the link. An example of the use of this code may be for short-term promotional services, or for files belonging to a person who no longer works at the site. In most cases a 404 response code would be returned rather than a 410.
411 Length Required The server refuses to accept the request without a defined Content-Length.
412 Precondition Failed The precondition given in one or more of the request-header fields evaluated to false when it was tested on the server.
413 Request Entity Too Large The server refuses to to process a request because the request entity is larger than the server is willing or able to process.
414 Request-URI Too Long The server is refusing to service the request because the Request-URI is longer than the server is willing to interpret. This result is rarely seen and may be a result of an improper request by the client or an attempted attack by the client.
415 Unsupported Media Type The server refuses to service the request because the entity of the request is in a format not supported by the requested resource for the requested method (e.g., an unknown MIME file type).
416 Requested Range Not Satisfiable The server cannot fulfill the request because the request included a Range request-header field, and none of the range-specifier values in this field overlap the current extent of the selected resource.
417 Expectation Failed The expectation given in an Expect request-header field could not be met by this server, or, if the server is a proxy, the server has unambiguous evidence that the request could not be met by the next-hop server.
5xx Server error
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request.
501 Not Implemented The server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.
502 Bad Gateway The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request.
503 Service Unavailable The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. This implies a temporary condition and may include a time-delay notice. The client may treat this as a 500 response.
504 Gateway Timeout The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server or another auxiliary server.
505 HTTP Version Not Supported The server does not support, or refuses to support, the HTTP protocol version that was used in the request message.

Thoughts on "HTTP Response Codes 2024"

Let's get FREE Gifts together. There're other Freebies here

AdBlock now to see them all. Click a button below to refresh