How to create custom error pages in cPanel

Whenever visitors to your website experience an error, they see an error page. This article describes the way to use cPanel to make custom error pages for your website.

Creating a custom error page

Visitors to your website see an error page whenever an error occurs. For instance, if users enter an incorrect URL or aren’t authorized to access specific directories, they see an error page. Companies often customize error pages by branding them with a company image and a link to their home page.


"Custom error pages are optional. An error page is always displayed, whether a custom error page exists or not. If an error page has not been customized, Apache displays a default error page."


To create or modify a custom error page, follow these steps:

1. Log into cPanel.

2. In the ADVANCED section of the cPanel home screen, click Error Pages:

   

3. Under Step 1, select the domain you want to configure for error pages.

4. Under Step 2, click the error page that you want to customize.

5. Type the HTML that you want to use on the error page. You can use the links above the editor to insert variables into your code for dynamic content. For instance, the following HTML code demonstrates the way to use a variable in a custom error page:


  


6. Click Save. cPanel saves the custom error page.

Deleting a custom error page

When you create a custom error page, cPanel creates a file with the filename format error_number.shtml in the document root of the domain. You’ll use the cPanel File Manager to delete this file. To do this, follow these steps:

1. Log into cPanel.

2. In the FILES section of the cPanel home screen, click File Manager:

   

3. Locate the document root directory (public_html) of the domain where you created the custom error page.

4. Delete the related file for the error number. For instance, if you created a custom error page for the 404 Not Found error, delete the 404.HTML file.


  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How can I change a database password on cPanel?

Changing MySQL database password via cPanel You can change your database’s password by...

How can I change my PHP version on cPanel?

Changing PHP version via cPanel Your Hosting Account's PHP version can be changed at any time,...

How can I create a new MySQL database in cPanel?

Creating a new MySQL database at Servers GATE using cPanel   You can easily create a new MySQL...

How can I locate my MySQL database details on cPanel?

Locating your MySQL database details via cPanel You can easily locate your MySQL databases...

How can I set up a redirect on cPanel?

Creating a redirect on cPanel Your hosting redirects can be easily managed with the assistance...