How to Create Custom Error Pages in cPanel

Creating a Custom Error page

  1. Login to your cPanel.
  2. Click the Error Pages button, in the Advanced section of cPanel.
    cPanel Advanced Error Pages
  3. If you have multiple domains in your cPanel, select it from the Managing menu.
    cPanel Domain Error Pages
  4. You will see a list of Common Error Codes, click the one you want to create a custom error page for. The available choices are 400 (Bad request)401 (Authorization required)403 (Forbidden)404 (Not found), and 500 (Internal server error). To edit additional error codes, click the Show All HTTP Error Status Codes tab. In my tests, I am selecting 404 (Not found)
  5. You will then be on an editor page. You can enter HTML code here, or insert premade tags if you want. Below is a brief description of the available tags.
    TagDescription
    Referring URL Lists the URL you came from.
    Visitor's IP address Lists the IP address of your site visitor.
    Requested URL Shows the URL you are attempting to access
    Server Name Shows the name of the server.
    Visitor's Browser Lists the the visitor's browser type.
    Redirect Status Code This will display the error message code, such as 500, or 404, etc.
  6. Click the Save button at the bottom when you are finished.

Setup your .htaccess File

  1. Edit the .htaccess file for your site, and add a rule for the errors you created. If you need help locating your .htaccess file, see our guide "Where is my .htaccess file?." Below is an example of the file formatting:
    ErrorDocument 400 /400.shtml
    ErrorDocument 401 /401.shtml
    ErrorDocument 403 /403.shtml
    ErrorDocument 404 /404.shtml
    ErrorDocument 500 /500.shtml
  2. Save your .htaccess file. Now when someone triggers an error message on your site, it will display your Custom Error Page.
    Error Page example


Congratulations, now you know how to create custom Error Pages in cPanel! For additional reading, here is a link to the official cPanel documentation on Error Pages.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Creating an Email Account in cPanel

Login To your cPanel. Once logged into cpanel, click on the "Email Accounts" located in the...

How to log into Webmail

1. After Open an Email Account from cPanel.2. Go To http://yourdomain.com/webmail3. Login with...

How to Create / Delete an FTP Account in cPanel

Creating an FTP Account Login to cPanel. Click the FTP Accounts button in the Files...

How to Change your cPanel Password

Reset Password from cPanel Please note you must know your current cPanel password to change it...

How to Setup an Email Forwarder in cPanel & Webmail

What are Email Forwarders? Email forwarders allow you to send a copy of an email from one email...