Setting Up Custom Error Pages
When visitors coming to a site request pages that the web server cannot find, the web server generates and displays a standard HTML HyperText Markup Language (HTML) is the main markup language for displaying web pages and other information that can be displayed in a web browser. page with an error message. You may want to create your own error pages and use them for your sites or individual virtual directories. The following error messages are the ones customized most often:
- 400 Bad File Request. Usually means the syntax used in the URL
In computing, a uniform resource locator (URL) (originally called universal resource locator) is a specific character string that constitutes a reference to an Internet resource. Both www.webnames.ca and www.webnames.ca/domain are examples of a URL is incorrect (for example, uppercase letter should be lowercase letter; wrong punctuation marks).
- 401 Unauthorized. Server is looking for some encryption key from the client and is not getting it. Also, wrong password may have been entered.
- 403 Forbidden/Access denied. Similar to 401; a special permission is needed to access the site – a password or username, if it is a registration issue.
- 404 Not Found. Server cannot find the requested file. File has either been moved or deleted, or the wrong URL or document name was entered. This is the most common error.
- 500 Internal Server Error. Could not retrieve the HTML document because of server configuration problems.
- 503 Service Temporarily Unavailable. The site is temporarily unavailable due to maintenance.
To configure the web server to show custom error pages for a site:
- Switch on support for custom error documents (which are enabled by default).
- Go to the Websites & Domains tab and in the list of domains, click the domain name you need.
- Select the Custom error documents checkbox.
- Click OK(Custom error documents are enabled on all accounts be default).
- Connect to your FTP
File Transfer Protocol (FTP) is a standard network protocol used to transfer files from one host to another host over a TCP-based network, such as the Internet. account, and go to the error_docs directory.
- Edit or replace the respective files. Be sure to preserve the correct file names:
- 400 Bad File Request - bad_request.html
- 401 Unauthorized - unauthorized.html
- 403 Forbidden/Access denied - forbidden.html
- 404 Not Found - not_found.html
- 405 Method Not Allowed - method_not_allowed.html
- 406 Not Acceptable - not_acceptable.html
- 407 Proxy Authentication Required - proxy_authentication_required.html
- 412 Precondition Failed - precondition_failed.html
- 414 Request-URI Too Long - request-uri_too_long.html
- 415 Unsupported Media Type - unsupported_media_type.html
- 500 Internal Server Error - internal_server_error.html
- 501 Not Implemented - not_implemented.html
- 502 Bad Gateway - bad_gateway.html
- 503 Service Temporarily Unavailable - maintenance.html
The web server will start using your error documents in a few hours, after it is restarted.