How to create custom error pages

What Error Pages can I customize?

  • 400 (Bad request) : The request could not be understood by the server. This is usually due to malformed syntax.
  • 401 (Authorization Required) : The page requested is secured and requires authentication. The error is displayed when the requestor fails to authenticate successfully.
  • 403 (Forbidden) : This page should contain more details why the page was unreachable since it is a refusal from the server to fulfill the request and not a badly formed request.
  • 404 (Not Found) : The requested URI could not be matched. Usually because the page does not exist.
  • 500 (Internal Server Error) : The server encountered an unexpected condition which prevented it from fulfilling the request. Very generic error that does not provide much detail on the provenance of the issue, but you can be certain it comes from the server side, and not the client side.

Create an error page in cPanel

1. Log in to your cPanel account through your Funio Hub. Under Advanced, click on Error Pages. You will find there all the types of error pages you can cusotmize.

2. Select the error page you would like to customize, and you will be able to insert text or HTML to customize your page.

Importing Personalized Error Pages and Manual Configuration

If you have your own error pages created already, and just need a way to have them working, you will need to do two things: upload the files and configure the .htaccess file. 

1. Upload your error page files in the directory of your choice on the server. We recommend putting them in an easily identifiable folder such as in the directory /public_html/errors/

2. As an example, here is the code that would need to be copied and pasted into your .htaccess file for error pages located in /public_html/errors/. The .htaccess file is located in the /public_html/ directory. If there is none, you can create one from the cPanel without a problem.

  • ErrorDocument 400 /erreurs/400.html
  • ErrorDocument 401 /erreurs/401.html
  • ErrorDocument 403 /erreurs/403.html
  • ErrorDocument 404 /erreurs/404.html
  • ErrorDocument 500 /erreurs/500.html

This tells the Webserver to look inside the /errors/ folder and to retrieve the specific error page for each of the different error types.

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.