|
When communicating via HTTP, a server is required to respond to a request, such as a web browser's request for an HTML document (web page), with a numeric response code and an email-like MIME message. In the code 404, the first "4" indicates a client error, such as a mistyped URL. The following two digits indicate the specific error encountered. HTTP's use of three-digit codes is similar to the use of such codes in earlier protocols such as FTP and NNTP.
At the HTTP level, a 404 response code is followed by a human-readable "reason phrase". The HTTP specification suggests the phrase "Not Found"[1] and many web servers by default issue an HTML page that includes both the 404 code and the "Not Found" phrase. Webservers can typically be configured to display a more natural description, a branded page or sometimes a search form, but the protocol level phrase, which is hidden from the user, is rarely customized.
Internet Explorer (pre IE7), however, will not display custom pages unless they are larger than 512 bytes, opting to instead display a "friendly" error page. This default behavior can be changed under Tools | Internet Options by clicking on the Advanced tab and un-checking the 'Show friendly HTTP error messages' check box.
A 404 error is often returned when pages have been moved or deleted. In the first case, a better response is to return a 301 Moved Permanently response, which can be configured in most server configuration files, or through URL rewriting; in the second case, a 410 Gone should be returned. Because these two options require special server configuration, most websites do not make use of them.
|