Error pages allow users to understand why the browser cannot access a resource on a website.
Creating custom error pages that contain links, buttons, and search bars can prove to be a great way to redirect your users to other resources on your site.
Table of Contents
Create custom error pages with cPanel
To create new custom error pages login to cPanel. Reach the “Advanced” section and click on the “Error Pages” tool.
From the first section of the page you can choose which domain to manage.
The second section of the page will instead allow you to select which error page you wish to edit.
As soon as you select an error page, a web page editor will open. Inside it you’ll be able to manually enter your custom code.
After making the changes, press the “Save” button to confirm the changes.
If the operation was successful, a confirmation message will appear.
Edit error pages
You can view the full list of error pages by selecting “Show all HTTP error status codes“.
To edit the custom error pages you just created, select the one you are interested in and replace the code inside it.
In the editor, at the top, you can also select some additional elements that you can insert within your page.
- Referral URL: by selecting this element you can show the address of the web page on which the user was browsing before connecting to your site
- IP Address: allows you to view the IP address of the user
- Requested URL: selecting this option will show the address of the web page the user is trying to connect to.
- Server name: show the name of your internet domain
- Visitor Browser: shows details about the browser and operating system used by the user
- Redirection Status Code: detects the numeric code of the error.
In the example below, you can see what a custom 404 error page might look like.
How to delete error pages
The newly created error pages are located in the public_html folder of your site and have, as a file name, the numeric code related to the error that represents them.
To delete them you’ll have to access the “File Manager” panel of cPanel.
Right-click on the page you wish to delete and select “Delete” from the context menu.
Select the “Skip the trash and permanently delete the files” item and press the “Confirm” button to completely delete the error page from your site.