The Service Provider Retrix Hosting

How do I set custom error 404 messages?

You can create a file in the root of your website called .htaccess. Inside you can override the error page for all types of HTTP errors, including the common “error 404 - file not found”.

Create a file in the root of your website called .htaccess. Add a line like the following:

ErrorDocument 404 /error.html

Replace “/error.html” with the path to the file you wish to use as your error document. This path is relative to the root of your website. You can also add additional lines for other types of HTTP errors such as 403 for “access denied” (if you have a password-protected section) and 500 for “internal server error” (occurs most commonly when a CGI script doesn’t work).

Please note that any errors in the .htaccess file will result in your entire website being inaccessible — visitors will receive an “Error 500 - Internal Server Error” message.

If you would like to read the Apache documentation on the ErrorDocument directive, you can visit http://httpd.apache.org/docs/1.3/mod/core.html#errordocument.