O'Reilly logo

Webmaster in a Nutshell, Second Edition by Robert Eckstein, Stephen Spainhour

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Server Responses and Status Codes

The server’s response to a client request is grouped into three parts. The first line is the server response line, which contains the HTTP version number, a three-digit number indicating the status of the request (called a server response code or status code), and a short phrase describing the status. The response line is followed by the header information and an entity body if there is one.

Status codes are typically generated by web servers. However, they can 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
100-199Informational
200-299Client request successful
300-399Client request redirected, further action necessary
400-499Client request incomplete
500-599Server 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 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.

100 Continue

The initial part of the request has been received and the client may continue with its request.

101 Switching Protocols ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required