Choose what to show what an error occurs
Custom error pages allow the creation of personalized pages that are shown to the visitor when an error occurs.
Access to cPanel or
Access to Funio Hub
Task completion: 15 minutes
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 requester 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 that prevented it from fulfilling the request. The very generic error 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.
How to do it?
Log in to your cPanel
Under Advanced, click on Error Pages.
You will find there all the types of error pages you can customize
Select the error page you would like to customize
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.
- 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/
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 /errors/400.html
ErrorDocument 401 /errors/401.html
ErrorDocument 403 /errors/403.html
ErrorDocument 404 /errors/404.html
ErrorDocument 500 /errors/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.