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.
![Cpanel Error Pages](https://supporthost.com/wp-content/uploads/2021/12/cpanel-error-pages-1024x175.png)
From the first section of the page you can choose which domain to manage.
![Error Pages Select Domain](https://supporthost.com/wp-content/uploads/2021/12/error-pages-select-domain-1024x422.png)
The second section of the page will instead allow you to select which error page you wish to edit.
![Edit Error Pages](https://supporthost.com/wp-content/uploads/2021/12/edit-error-pages.png)
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.
![Editor Error Page](https://supporthost.com/wp-content/uploads/2021/12/editor-error-page-1024x554.png)
After making the changes, press the “Save” button to confirm the changes.
![Creating Custom Error Pages](https://supporthost.com/wp-content/uploads/2021/12/creating-custom-error-pages-1024x579.png)
If the operation was successful, a confirmation message will appear.
![Error Page Saved](https://supporthost.com/wp-content/uploads/2021/12/error-page-saved.png)
Edit error pages
You can view the full list of error pages by selecting “Show all HTTP error status codes“.
![Show All Http Error Status Codes](https://supporthost.com/wp-content/uploads/2021/12/show-all-http-error-status-codes.png)
To edit the custom error pages you just created, select the one you are interested in and replace the code inside it.
![Edit Error Pages 404 Error](https://supporthost.com/wp-content/uploads/2021/12/edit-error-pages-404-error.png)
In the editor, at the top, you can also select some additional elements that you can insert within your page.
![Edit Error Pages Insert Tag](https://supporthost.com/wp-content/uploads/2021/12/edit-error-pages-insert-tag-1024x625.png)
- 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.
![Example Custom Error Page](https://supporthost.com/wp-content/uploads/2021/12/example-custom-error-page-1024x563.png)
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.
![Cpanel File Manager](https://supporthost.com/wp-content/uploads/2021/12/cpanel-file-manager-1024x236.png)
Right-click on the page you wish to delete and select “Delete” from the context menu.
![Delete Error Page](https://supporthost.com/wp-content/uploads/2021/12/delete-error-page.png)
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.
![Permanently Delete Error Page File](https://supporthost.com/wp-content/uploads/2021/12/permanently-delete-error-page-file.png)