Support Portal Language
 
HomeKnowledge BaseVPSHow do I customise the web server error messages on my VPS
Information
Article ID67
Created On10/14/2008
Modified10/14/2008
Share With Others
How do I customise the web server error messages on my VPS
How do I customise the web server error messages on my VPS

When visitors coming to a site request pages that the web server cannot find, the web server generates and displays a standard error page. The standard error messages do not usually explain how to resolve problems, or help lost visitors get where they wanted to be. They also look dull, and different to the rest of your website's design.

You can create your own error pages and use them on your web server. Plesk will let you customise the following error messages:

  • 400 - bad file request. Usually means the syntax used in the URL is incorrect (e.g. uppercase letter should be lowercase letter; wrong punctuation).
  • 401 - unauthorised. The server is looking for some encryption key from the client and is not getting it. Or maybe the wrong password was entered.
  • 403 - forbidden or access denied. Similar to 401; a special permission is needed to access the site - usually a username and password.
  • 404 - not found. The server cannot find the requested file. It's 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 document because of server-configuration problems.
To configure Plesk’s web server to show custom error pages for a domain:

1. Switch on support for custom error documents through Plesk: 

           1. Click the Domains shortcut in the navigation pane.
           2. Click the required domain name in the list.
           3. Click Setup
           4. Select the Custom Error Documents checkbox.
           5. Click OK

2. If you access Plesk remotely, connect to your FTP account on the Plesk server, and go to the error_docs directory. If you access Plesk locally, go to the directory /vhosts/yourdomain.com/error_docs/.

3. Edit or replace the respective files. Be sure to preserve the correct file names:

  • 400 - bad file request: bad_request.html
  • 401 - unauthorised: unauthorized.html
  • 403 - forbidden or access denied: forbidden.html
  • 404 - not found: not_found.html
  • 500 - internal server error: internal_server_error.html
4. Restart your web server or wait for a few hours till your web server is restarted. After that, the web server will start using your error documents.