Error pages play a crucial role in informing visitors about issues when they try to access your site. Each problem has its own status code. For instance, a 404 error appears when a visitor enters a non-existent URL, and a 401 error shows up for an unauthorized user trying to access a restricted area. While basic error pages are automatically provided by the web server (Apache), you can create custom error pages for any valid HTTP status code starting with 4 or 5 using cPanel.
Customizing an Error Page
Follow these steps to create a custom error page:
- If your account manages more than one domain, select the domain for which you want to edit an error page from the 'Managing' menu.
- Click on the error status code for which you want to edit its error page. If you don't see the desired error status code in the list, click on the 'Show All HTTP Error Status Codes' tab, then select the desired error status code.
- Enter a message in the text box. This message will be displayed on the error page.
- To display visitor-specific information on the error page, click the appropriate buttons for the information you want to display.
- You can enter additional HTML code to further customize your error pages.
- Click 'Save' to apply the changes.
By following these steps, you can create custom error pages that provide more helpful information to your visitors when they encounter an issue. This can improve the user experience and keep visitors on your site even when they encounter a problem.