Skip to content

Creating custom error pages in cPanel

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.

  • 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.
  1. Log in to cPanel.

  2. On the Tools page → Advanced section, click Error Pages.

  3. Under Step 1, select the domain you want to configure.

  4. Under Step 2, choose the error code you want to customize (e.g., 400, 401, 403, 404, 500).

  5. 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>
  6. Click Save.

    • cPanel saves the custom error page as error_number.shtml in your domain’s document root.
  1. Log in to cPanel.

  2. On the Tools page → Files section, click File Manager.

  3. Navigate to the domain’s document root (public_html).

  4. Locate the error page file (e.g., 404.shtml).

  5. Delete the file.

    • Apache will revert to showing the default error page.