One of the many things one can do to make their website a little more professional-looking is to create custom error pages which will be displayed instead of the default generic error pages such as "404 - File Not Found". In addition to there being practical uses to this (ex: one can include an option to allow users to notify you of dead links or even setup a script to notify you automatically) an attractive looking custom error pages can make even your mistakes look good.
While the HostRocket Control Panel includes a "Custom Error Pages" tool which can be used to easily setup custom error documents if preferred one can also accomplish this manually by modifying the .htaccess file in their public_html directory.
The most commonly encountered error messages are:
400 - Bad Request 401 - Authorization Required 403 - Forbidden 404 - Not Found 500 - Internal Server Error
In order to have custom error pages you create yourself displayed instead of the default server errors one would add directives similar to the following to their /public_html/.htaccess file:
The above assumes that one names the files ###.html where ### represents the number of the error (one can name the files anything they wish and modify the directives accordingly) and places the files within their public_html folder. If storing the files within a subdirectory is preferred this can also be done. The following example shows the appropriate directives to use if one were to upload their custom error pages to a subdirectory named "err":
In Microsoft Internet Explorer version 5.x and later by default Microsoft's own "friendly" error pages will be displayed unless your custom error document is 512 bytes or larger so in order to make sure that your error pages are displayed make sure that the size of all custom error pages exceeds 512 bytes. If necessary one can "pad" the size of the file using hidden comments such as the following example: