When visitors encounter errors on your website (such as a missing page or unauthorized access), they see an error page. By default, Apache displays a generic error page. With cPanel, you can create custom error pages to provide a branded, user‑friendly experience.
Why Use Custom Error Pages?
-
Improve user experience with helpful messages.
-
Maintain consistent branding across your site.
-
Provide navigation links back to your homepage or other resources.
-
Reduce visitor frustration when errors occur.
Steps to Create a Custom Error Page
-
Log in to cPanel.
-
On the Tools page → Advanced section, click Error Pages.
-
Under Step 1, select the domain you want to configure.
-
Under Step 2, choose the error code you want to customize (e.g., 400, 401, 403, 404, 500).
-
In the editor, type the HTML you want to use for the error page.
-
You can insert variables for dynamic content using the links above the editor.
-
Example:
<h1>404 Not Found</h1> <p>The requested page, <!--#echo var="REQUEST_URI" -->, is not available.</p> <a href="/">Return to Homepage</a>
-
-
Click Save.
-
cPanel saves the custom error page as
error_number.shtmlin your domain’s document root.
-
Deleting a Custom Error Page
-
Log in to cPanel.
-
On the Tools page → Files section, click File Manager.
-
Navigate to the domain’s document root (
public_html). -
Locate the error page file (e.g.,
404.shtml). -
Delete the file.
-
Apache will revert to showing the default error page.
-
Notes
|