Setting Up Custom Error Pages on Windows Servers
To configure the web server to show custom error pages for a site or a directory within a site:
- If you are subscribed to several hosting packages and have access to several webspaces associated with your account, in the Subscription menu at the top of the screen, select the required webspace.
- Switch on support for custom error documents.
- 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.
- Go to the Websites & Domains tab > Virtual Directories to see the list of error documents for the root web directory. Error documents located here are used for all web pages of the selected site. If you want to customize error pages for a specific virtual directory, navigate to that directory.
- 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 directory in the virtual host directory of the domain, select File in the Type menu and specify the file name in the Location field.
- To use a custom HTML document located in a 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,
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, you need to type the following path into the Location field:
Note: You can use a connection over FTP or File Manager in the Panel 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).
- Once the web server is restarted, it will start using your error documents.
Please send us your feedback on this help page.