Server Response Codes

Contents:

The first line in an HTTP server response indicates whether the client request was successful or not, and why. The status is given with a three-digit server response code (also known as a status code) and a descriptive message.

Status codes are usually generated by Web servers, but they might also be generated by CGI scripts that bypass the server's precooked headers and supply their own. Status codes are grouped as follows:

Code Range Response Meaning
-199 Informational
-299 Client request successful
-399 Client request redirected, further action necessary
-499 Client request incomplete
-599 Server errors

HTTP defines only a few specific codes in each range, although servers may define their own as needed. If a client receives a code that it does not recognize, it should understand its basic meaning from its numerical range. While most Web browsers handle codes in the 100-, 200-, and 300- range silently, some error codes in the 400- and 500- range are commonly reported back to the user (e.g., "404 Not Found").

Informational

A response in the range of 100-199 is informational, indicating that the client's request was received and is being processed.

Client Request Successful

A response in the range of 200-299 means that the client's request was successful.

Redirection

A response code in the 300-399 range indicates that the request was not performed and the client needs to take further action for a successful request.

Client Request Incomplete

A response code in the range of 400-499 means that the client's request was incomplete, and may indicate further information is required from the client.

Server Errors

Response codes in the range of 500-599 indicate that the server encountered an error and may be unable to perform the client's request.