When a client makes a request, one item the server sends back is a status code, which is a three-digit numeric code. There are four categories of status codes:
Status codes in the 100–199 range indicate a provisional response.
Status codes in the 200–299 range indicate a successful transaction.
Status codes in the 300–399 range are returned when the URL can’t be retrieved because the requested document has moved.
Status codes in the 400–499 range indicate the client has an error.
Status codes of 500 and higher indicate that the server can’t perform the request, or an error has occurred.
Status Code contains some common status codes.
Table B–2 Common HTTP status codes
Status code |
Meaning |
---|---|
OK; successful transmission. This is not an error. |
|
302 |
Found. Redirection to a new URL. The original URL has moved. This is not an error; most browsers will get the new page. |
304 |
Use a local copy. If a browser already has a page in its cache, and the page is requested again, some browsers (such as Netscape Navigator) relay to the web server the “last-modified” timestamp on the browser’s cached copy. If the copy on the server is not newer than the browser’s copy, the server returns a 304 code instead of returning the page, reducing unnecessary network traffic. This is not an error. |
401 |
Unauthorized. The user requested a document but didn’t provide a valid username or password. |
403 |
Forbidden. Access to this URL is forbidden. |
404 |
Not found. The document requested isn’t on the server. This code can also be sent if the server has been told to protect the document by telling unauthorized people that it doesn’t exist. |
500 |
Server error. A server-related error occurred. The server administrator should check the server’s error log to see what happened. |