Follow the steps below to add custom error pages for your Linux hosting plan.
Step 1: Login to the cPanel of the domain name for which you wish to set custom error pages
Step 2: Add the custom error page
-
Click on Error Pages under the Advanced section.
-
Select your domain from the drop-down list.
-
Click on the error page you wish to customize.
-
Add your custom HTML content for the error page. You may insert any of the available tags to your custom error page.
-
Click on Save.
Step 3: Update the .htaccess file with the custom error page
-
Click on File Manager.
-
If you are unable to find the .htaccess file, ensure the Show Hidden Files option is selected.
-
If you still do not find the .htaccess file, you can create it by clicking on the File option.
-
Edit the .htaccess file and add the following rule and save the file.
ErrorDocument 400 /400.shtml
Note
The error code and file name should be changed based on the error code for which you have added the custom error page. For example, for the error code 404, you should add the rule as below:
ErrorDocument 404 /404.shtml