|
useit.com |
| Search |
By default, most Web servers return a simple "404 Not Found" error message when they get a request for a URL that they don't have. This error message violates the three basic guidelines for error messages. All error messages must be:
In terms of the "URL not found" error message, it would be better to explain to the user why the URL could not be found. It would be even better to list the most common mistakes in accessing files on the given site: for example, users often request URLs ending in .htm for sites that consistently use .html for all pages (or they use .html when all pages end in .htm). For any given site, it is recommended to have consistent naming conventions and list these conventions on a custom error message page.
Even better: provide a constructive error message by having the server perform a spelling check on any erroneous URLs to see if they are a close match for valid URLs. Even though Apache supports this feature, the necessary code (mod_speling) is unfortunately not compiled in by default, so it is necessary for the webmaster to recompile the server to improve error handling.
Tobias Ratschiller reports that it reduced the number of 404-errors by at least 40% when spelling check for failed URLs was added to a site with hotel homepages.
If your Web server supports customized 404 error pages, then the recommended actions are:
Update added April 1999: Internet Explorer 5.0 apparently assumes that anything shorter than 512 bytes is a poorly written server error message and replaces it with its own text. The IE5 error message is admittedly more usable than the standard error message, but often less appropriate than a customized error message that can provide constructive hints for getting the desired page on the specific site. Thus, even though usually I advocate short text, it will be necessary to make any customized 404 message more than 512 characters long to have it displayed by IE5.