Errors in the HTTP protocol are behavior of a web server when, for some reason, it cannot successfully send the requested document to the client. The server communicates the error code to the client in the HTTP header.
Each error issued by the web server has a code corresponding to the class of error that occurred. Error codes (such as 403 or 404) are standardized and described in detail in the Internet standard RFC2616 (Hypertext Transfer Protocol — HTTP/1.1). You can refer to this document for a detailed description of a specific error as the original source.
An example of a web request made manually using the program telnet:
# telnet www.ava.hosting 80
Trying 217.16.20.20...
Connected to www.ava.hosting.
HEAD / HTTP/1.1
Host: www.ava.hosting
HTTP/1.1 200 OK
Date: Mon, 29 Mar 2004 08:24:07 GMT
Server: CoffeeMaker/1.12 (Unix) mod_ssl/2.8 OpenSSL/0.9
The server returned a successful error code of 200 (OK). This was an example of a correct request to a document existing on the server that completed successfully. If the requested document did not exist on the server, the server would behave differently and issue a 404 error (document not found):
# telnet www.ava.hosting 80
Trying 217.16.20.20...
Connected to www.ava.hosting.
HEAD /abcdef HTTP/1.1
Host: www.ava.hosting
HTTP/1.1 404 Not Found
Date: Mon, 29 Mar 2004 08:42:01 GMT
Server: CoffeeMaker/1.12 (Unix) mod_ssl/2.8 OpenSSL/0.9
Error codes can be positive and negative or successful and unsuccessful. There are four types of codes: