HTTP 1.1 Response Status Codes

(2 votes, average 5.00 out of 5)

When a request is sent to a web server, the web server will return a HTTP (HyperText Transfer Protocol) status code. These status codes are listed in five different categories, listed below:

  • 1XX - Informational
  • 2XX - Success
  • 3XX - Redirection
  • 4XX - Client Error
  • 5XX - Server Error

The complete list of status codes are listed below. All status codes are listed for the HTTP/1.1 standard.

Code Name Description
100 Continue The server has received the request headers and the client should send the request body (if the body needs to be set, like in a POST request). The server MUST send a final response after the request has been completed.
101 Switching protocols The requester has asked the server to switch protocols and the server is acknowledging that it will do so.
102 Processing As a WebDAV request may contain many sub-requests involving file operations, it may take a long time to complete the request. This code indicates that the server has received and is processing the request, but no response is available yet. This prevents the client from timing out and assuming the request was lost.
200 OK Standard status code response for a successful HTTP request. In a GET request, the response will contain an entity corresponding to the requested resource. In a POST request the response will contain an entity describing or containing the result of the event.
201 Created The request has been handled and a new resource has been created.
202 Accepted  The server has accepted the request, but has not handled it yet.
203 Non-Authoritative Information The server successfully handled the request, but may be returning information from another source.
204 No Content The server successfully handled the request, but is not returning any content.
205 Reset Content The server successfully handled the request, but is not returning any content. This response instructs the requester to reset the document view.
206 Partial Content The server is only responding with part of the resource due to a range header sent by the client. The range header is used by tools like wget to enable resuming of interrupted downloads, or split a download into multiple simultaneous streams.
207 Multi-Status The message body that follows is an XML message and can contain a number of separate response codes, depending on how many sub-requests were made.
300 Multiple Choices The server has several options to complete the request. The server may choose an action based on the requestor (user agent) or the server may present a list so the requestor can choose an action.
301 Moved Permanently The requested page has been permanently moved to a new location. When the server returns this response, it will automatically redirect the requestor to the new location.
302 Found The server is currently responding to the request with a page from a different location, but the requestor should continue to use the original location for future requests. This code is similar to a 301 in that for a GET or HEAD request, it automatically forwards the requestor to a different location.
303 See Other The server returns this code when the requestor should make a separate GET request to a different location to retrieve the response. For all requests other than a HEAD request, the server automatically forwards to the other location.
304 Not Modified  The requested page hasn't been modified since the last request. When the server returns this response, it doesn't return the contents of the page.
305 Use Proxy The requestor can only access the requested page using a proxy. When the server returns this response, it also indicates the proxy that the requestor should use.
306 Switch Proxy ***No longer used***
307 Temporary Redirect The server is currently responding to the request with a page from a different location, but the requestor should continue to use the original location for future requests. This code is similar to a 301 in that for a GET or HEAD request, it automatically forwards the requestor to a different location.
400 Bad Request The server didn't understand the syntax of the request.
401 Not Authorized The request requires authentication. The server might return this response for a page behind a login.
403 Forbidden The server is refusing the request.
404 Not Found The server can't find the requested page.
405 Method Not Allowed The method specified in the request is not allowed.
406 Not Acceptable The requested page can't respond with the content characteristics requested.
407 Proxy Authentication Required This status code is similar 401 (Not authorized); but specifies that the requestor has to authenticate using a proxy. When the server returns this response, it also indicates the proxy that the requestor should use.
408 Request Timeout The server timed out waiting for the request.
409 Conflict The server encountered a conflict fulfilling the request. The server must include information about the conflict in the response. The server might return this code in response to a PUT request that conflicts with an earlier request, along with a list of differences between the requests.
410 Gone The server returns this response when the requested resource has been permanently removed. It is similar to a 404 (Not found) code, but is sometimes used in the place of a 404 for resources that used to exist but no longer do. If the resource has permanently moved, you should use a 301 to specify the resource's new location.
411 Length Required The server won't accept the request without a valid Content-Length header field.
412 Precondition Failed The server doesn't meet one of the preconditions that the requestor put on the request.
413 Requested Entity Too Large The server can't process the request because it is too large for the server to handle.
414 Requested-URI Too Long The requested URI (typically, a URL) is too long for the server to process.
415 Unsupported Media Type The request is in a format not support by the requested page.
416 Requested Range Not Satisfiable The server returns this status code if the request is for a range not available for the page.
417 Expectation Failed The server can't meet the requirements of the Expect request-header field.
418 I'm a teapot Defined as one of the traditional IETF April Fools' jokes.
421 There are too many connections from your internet address Too many connections from your internet address are accessing the same server.
422 Unprocessable Entity The request was well-formed but was unable to be followed due to semantic errors.
423 Locked The resource that is being accessed is locked.
424 Failed Dependency The request failed due to failure of a previous request (e.g. a PROPPATCH).
425 Unordered Collection Defined in drafts of "WebDAV Advanced Collections Protocol",but not present in "Web Distributed Authoring and Versioning (WebDAV) Ordered Collections Protocol".
426 Upgrade Required The client should use a different protocol, such as TLS/1.0.
449 Retry With A Microsoft extension. The request should be retried after doing the appropriate action.
450 Blocked by Windows Parental Controls A Microsoft extension. This error is given when Windows Parental Controls are turned on and are blocking access to the given webpage.
500 Internal Server Error The server encountered an error and can't fulfill the request.
501 Not Implemented  The server doesn't have the functionality to fulfill the request. For instance, the server might return this code when it doesn't recognize the request method.
502 Bad Gateway The server was acting as a gateway or proxy and received an invalid response from the upstream server.
503 Service Unavailable The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state.
504 Gateway Timeout The server was acting as a gateway or proxy and didn't receive a timely request from the upstream server.
505 HTTP Version Not Supported The server doesn't support the HTTP protocol version used in the request.
506 Variant Also Negotiates Transparent content negotiation for the request, results in a circular reference.
507 Insufficient Storage Used by WebDAV.
509 Bandwidth Limited Exceeded This status code, while used by many servers, is not specified in any RFCs.
510 Not Extended  Further extensions to the request are required for the server to fulfill it.
530 User access denied The requestor does not have access to the resource.
Partner Links:
Last Updated on Monday, 28 June 2010 09:17  
Related Articles

» Copy or Backup Files Faster in Windows 7 or Vista Using Window's Robocopy

In all versions of Windows 7 there is a little known but easy to use utility bundled in called Robocopy.  Why would you want to use Robocopy over just dragging and dropping or copying and pasting files and folders over manually? Here are some reasons why you might want to add Robocopy to your toolbox of useful utilities:Robocopy is MUCH faster at copying a large number of files from one location to another compared to the built in Windows copy.Robocopy can intelligently "Backup" (Mirror) a...

» Keyboard Shortcuts for Microsoft Word

Shortcuts are combinations of keys that when pressed at the same time perform a command. Shortcuts allow the user to minimize or eliminate the use of a mouse. This can allow users to use programs faster and more efficiently. The following is a listing of the shortcuts (and their commands) that are compatible with Microsoft 2002, 2003, and 2007. Also, highlighted are the most commonly used shortcuts. Command Name Shortcut Keys ...

» For Loops in PHP

To create a for loop in php, follow these simple steps:Set a counter variable to some initial value.Check to see if the conditional statement is true.Execute the code within the loop.Increment a counter at the end of each iteration through the loop.The following is pseudo php code for a for loop:123for(init counter; conditional statement; increment counter){ inner code;}As you can see, all of the above steps are taken care of within the for loop, making the syntax short and easy to...