How to Set Up cPanel Custom Error Pages
Whenever there's a problem accessing your website, your visitors will see an error message. Each message has its own page and code specific to the problem encountered. Although the web server automatically provides basic error pages, with the Error Pages tool in the cPanel, you can create custom error pages to display when a user enters a wrong URL, an outdated URL, or the user is not authorized to access a specific directory of your webspace.
Why Create Custom Error Pages?
Default error messages are functional but lack branding or guidance. With cPanel custom error pages, you can:
- Provide clear instructions for users who enter incorrect or outdated URLs.
- Redirect visitors to your homepage or other important sections of your site.
- Maintain a professional look for errors related to bad requests, not found issues, or server access issues.
- Display useful information, such as the intended URL, server name, and the visitor’s browser type.
Already have error pages created? If you already have error pages, there is no need to follow this tutorial. You may instead add the following to your .htaccess file:
- ErrorDocument error-number /Your-Error-file.html
The "error-number" represents the error code used by Apache. For example, to use the file "notfound.html" as a 404 error page:
- ErrorDocument 404 /notfound.html
How to Create Custom Error Pages in cPanel
- Log in to your Bluehost Account Manager.
- In the left-hand menu, click Websites.
- Click the MANAGE button located next to the website you want to manage.

- Under the OVERVIEW tab, click the CPANEL button.

- Click the Error Pages icon in the Advanced section.

- From the Managing dropdown menu of Step 1, select the domain for managing error pages.

- In Step 2, click the Show All HTTP Error Status Codes tab to view all error pages.

- You'll see a list of common HTTP error status codes, such as:
- 400 - Bad request
- 401 - Authorization required
- 403 - Forbidden
- 404 - Not found
- 500 - Internal Server Error
Select the error code you want to customize.
- In the Error Pages section, the following six tags are available:
Tags Functions Referring URL Displays the URL of the website the visitor was previously viewing. Visitor's IP Address Displays the IP address of the visitor viewing the error page. Requested URL Displays the intended URL the visitor is trying to view. Server name Displays the website's server name. Visitor's browser Displays the visitor's browser type, such as IE, Firefox, etc. Redirect Status Code Displays the type of code in the 300-307 range. You don't have to use any of the above tags. They are available to you based on your preferences and needs specific to your website.
-
Customize your error page by including any HTML code or text in the error page that suits your preferences and website needs.

- Once done editing, click Save. By default, the file name will match the error number with a .shtml extension. You can rename it, but only to an error code that will actually be displayed on your website. If you chose 400, your file would be named "400.shtml." You can change this to a name reflecting an error you anticipate on your website.
Common Issues and How to Fix Them
Here are some common issues in setting up custom error pages and how to resolve them.
Still Seeing the Default Error Page
Try refreshing your browser. If the default error remains, update your .htaccess file in your document root with:
- ErrorDocument 403 /403.shtml
- ErrorDocument 404 /404.shtml
- ErrorDocument 500 /500.shtml
Redirect to an Existing Page Instead
If you don't want your visitors to see the 404 error page on your web page, you can opt to redirect them to your home page instead. Update your .htaccess file with
- ErrorDocument 404 /index.shtml
Error Page Not Showing in Internet Explorer
Ensure your custom error page is larger than 1 KB. Otherwise, IE may display its own default message instead.
Summary
Learn how to create custom error pages in cPanel, allowing you to replace the default, unbranded server messages, such as 404 Not Found or 403 Forbidden, that visitors see when they encounter an issue on your website. By creating custom error pages in cPanel, you can personalize messages, offer helpful navigation links, and maintain a consistent experience for your visitors.
If you need further assistance, feel free to contact us via Chat or Phone:
- Chat Support - While on our website, you should see a CHAT bubble in the bottom right-hand corner of the page. Click anywhere on the bubble to begin a chat session.
- Phone Support -
- US: 888-401-4678
- International: +1 801-765-9400
You may also refer to our Knowledge Base articles to help answer common questions and guide you through various setup, configuration, and troubleshooting steps.