How to add custom error pages?

Custom error pages can be created from cPanel -> Error pages. An editor is available for every error status inside the tool where you can place the code of your error page

Once created you should also create an .htaccess file in the public_html directory containing the rewrite rules related to the error page:

Examples:

for custom 404 error page you should add:

for custom 500 error page you should add:

If you already have an .htaccess file please just add the corresponding lines inside by editing the file through cPanel -> File manager or using external text editor locally on your computer.

cPanel is easy to work with when you have the right host to support you. If you need a reliable partner to help you manage your website with cPanel, check out our cPanel hosting services!

2 Comments

  1. Reply May 23, 2015 / 18:50 DeanSiteGround Team

    Can you make use of a 404.php page from within a WordPress site?
    It appears that the server ONLY recognizes 404.shtml.

    Can someone help?

    Thanks!

    • Reply May 25, 2015 / 05:40 Hristo PandjarovSiteGround Team

      By default WordPress will recognize a 404.php file and route the not found requests to it. If you're using WordPress you don't need to add any particular lines in that .htaccess file.

* (Required)