How to add custom error pages?

Using customer error pages is a relatively simple task. Most modern content management systems have their own way of creating a custom error page or it can be achieved by adding a plugin that has this functionality.

If you would like to use a custom error page of your own this is also possible. You start with creating the desired page. It can be HTML, PHP an image or anything else you choose and that would suit your needs.

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 that you have named not_found.html you should add:

for custom 500 error page that you have named internal_server_error.html you should add:

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

You find this article useful? Click here to learn more about SiteGround web hosting experts and what else we can do for you!