Previous page | Next page | Locate page |

## Customizing Web Server Error Messages (Windows Hosting)

When visitors coming to a site request pages that the Web server cannot find, the Web server generates and displays a standard HTML page with an error message. The standard error messages may inform of problems, but they do not usually say how to resolve them or how to get the lost visitor on his way, and they also look dull.

You may want to create your own error pages and use them on your Web server. The following error messages are the ones customized most often:

- 400 Bad File Request. Usually means the syntax used in the URL is incorrect (e.g., 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 and/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.

To configure Parallels Plesk Panel's Web server to show custom error pages for a domain:

1. Switch on support for custom error documents through Parallels Plesk Panel.
   1. Go to Home > Web Hosting Settings.
   2. Select the Custom error documents check box.
   3. Click OK.
2. Go to Home > Virtual Directories to see the list of error documents for the root Web directory (error documents located here are used for all domain Web pages). If you want to customize error pages for a certain Web directory, go to that directory.
3. Click Error Documents tab and click the required error document in the list.
   - To use the default document provided by IIS for this error page, select Default in the Type menu.
   - To use a custom HTML document already located in the `error`_docs`` directory on a domain, select File in the Type menu and specify the file name in the Location field.
   - To use a custom HTML document located in directory other than `error_docs` on a domain, select URL in the Type menu and enter the path to your document in the Location field. The path should be relative to the virtual host root (that is, `<vhosts>\<domain>\httpdocs`).

     For example, you have created a file `forbidden_403_1.html` and saved it in the `my_errors` directory located in the `httpdocs`. To use this file as an error document, the following path should be entered in the Location filed: `/my_errors/forbidden_403_1.html`.

     Note. You can use both FTP and File Manager to upload your custom error document to the server. By default, all error documents are stored in the `/vhosts/your-domain.com/error_docs/` directory (located in `C:\InetPub` by default).

4. Once the Web server is restarted, it will start using your error documents.