Sign Up / Log In
Need help?
000 800 100 3215
Online Support Web Hosting

How to Create Custom Error Pages

When your website is encountering an issue, it displays an error page to inform visitors of the problem. By default, they will see the error page set by your hosting provider. This can be customised easily in your cPanel, so you can personalise error messages.

In this guide, you’ll learn how to create custom error pages. And we’ll guide you through how to add .htaccess rule, in case your customised error pages do not show.

How to Create Custom Error Pages

Follow the steps below to create custom error pages.

Step 1. Access your Hosting Manager.
Step 2. On the Home page, click Advanced or the [ v ] arrow symbol on the right side, then click Error Pages.
advance option in hosting manager to access apache handler apache handler option icon option in hosting manager
Step 3. Under Step 1 - Select Domain to Manage Error Pages, select the domain you would want to manage from the drop-down. If you only have one domain name you can skip this part and proceed to Step 4.
step 1 select domain name from the drop down feature to customise error pages
Step 4. Under Step 2 - Select Page, if the error message you want to customise is a common error page for websites. Check under the Common Error tab.
Or you can click the Show All tab to see the complete list of error pages. Then, click the corresponding link to customise.
step 2 select the error message to customise choose between common error tab and show all tab
Step 5. You’ll be directed to an editor page. Enter custom page code (e.g. HTML) or insert tags if you want.
editor text-box to customise error message for the selected error message See table below for a brief description of available tags:
Referring URL Lists the previous URL
Visitor’s IP Address Lists IP address of visitor
Requested URL Shows URL you tried to access
Server Name Shows server's name
Visitor's Browser List of browser type of visitors
Redirect Status Code Display error message codes
Step 6. Click the Save button.

A confirmation message will appear that changes are saved. Click the Go Back button to continue customising other error pages.

You can also set up .htaccess rule if in case, your custom error pages do not show.

How to Setup .htaccess Rule

Before making any changes, make sure to save a backup copy of your files by following the steps in this linked guide.

If you are seeing Crazy Domainsdefault pages as your Error Pages, add a .htaccess rule. Follow the steps below.

  1. Access the File Manager.
  2. Click the public_html folder from the left menu panel.
  3. Select the domain name you wish to manage.
  4. Click the .htaccess file, then select Code Editor option at the upper part of the page.
    You may also right-click .htaccess, then select Code Edit.
  5. Add the following code to your .htaccess file and change the error number to the ones you customise:
        ErrorDocument 411 /411.shtml
        ErrorDocument 412 /412.shtml
        ErrorDocument 505 /505.shtml
    You can use existing pages as your resulting page in case you don’t want visitors seeing error pages. Just change the code after the slash ( / ) on the code above. In the example below, your home page will display whenever there is 505 Error.
    ErrorDocument 505 /index.html
  6. Click the Save Changes button.

Congratulations! You've just customised your error pages. Please let us know if you need any further assistance, or if you have any questions. We’d love to help!

Was this helpful? Yes No 82% of people found this helpful.
we're
online
Need Help? Chat Now