How to Create Custom Error Pages in WebSitePanel

Applied on: WebSitePanel (Windows) Hosting

Use this tab to customize HTTP error messages that are sent to clients when web server errors occur. It is possible to use generic default HTTP 1.1 errors, detailed custom error files that IIS provides, or create your own custom error files.

The most common error codes can be found here. This blog contains common HTTP codes, also applied on Windows hosting environment. All HTTP status codes can be found here.

Here I will describe the inputs available on the custom error tab on the Website Properties page.

  • Code – All custom error messages display industry-standard HTTP codes which ensure consistency with HTTP 1.1 error messages. You do not need to change this setting.
  • Sub Code – Displays the Sub Code associated with HTTP Error Codes and does not require any change in normal settings.
  • Handler Type – the web interface allows you to have your own custom page for different HTTP error codes:
    • File – type the location of the file mapped to the custom error. It is usually your home location, where you place your files/folders, provided by the web host.
    • URL – to map the custom error to a URL, select URL and enter the path to the URL beginning with the virtual directory name; for example  /virdir1/errors/404.htm
    • Default – this will reset the error page of Windows 2003 server to the default setting where the URL allows you to have the error page in URL format.
  • Error Content – displays the URL/File/Default location, depending upon the Handler Type selection.

How to add custom error page:

Step 1. Open the Web Site Properties page.

Step 2. Select the Custom Errors tab and click the Add Custom Error button. A new record will be added at the end of the custom errors list.

Step 3. Type the custom error code, sub code, handler type and error content.

Step 4. Click the Update button. This will modify your web.config and add a few lines for newly created custom error pages.

To delete an existing custom error, just click the Delete button and then click the Update button.

This concludes how to create custom error pages in WebSitePanel

Tags: , , , , , , , , , , , , , , | Posted under DotNet/Windows Hosting, WebsitePanel Tutorials | RSS 2.0

Leave a Reply

Your email address will not be published. Required fields are marked *