Whenever there’s a problem accessing your website, visitors will see an error message. Each message corresponds to a specific error code generated by your web server. While servers provide a default error page for each issue, these often look generic. By creating custom error pages in cPanel, you can personalize messages, offer helpful navigation links and maintain a consistent experience for your visitors.
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 when a user enters a wrong or outdated URL.
- Redirect visitors to your home page or other important areas of your site.
- Maintain a professional look for bad requests, not found or server access errors.
- Display useful details such as the intended URL, server name or visitor’s browser type.
How to Create Custom Error Pages in cPanel
Follow these steps to set up your own cPanel error pages:
Step 1: Choose Website
- Go to the Bluehost login page and sign in.
Read more: How to Log into cPanel via the Account Manager
- From the left-hand menu, click Websites.
- Choose the website you want to manage and select “Manage.”.
Step 2: Navigate to cPanel
- From the bottom, choose the cPanel option.
- Scroll down to find “Error Pages” under the “Advanced” section.
Step 3: Select Your Domain
- From the drop-down, choose the domain for which you want to create custom error pages.
Step 4: Choose the Error Page to Customize
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.
Step 5: Customize Your Error Page
When editing an error page, you can use HTML and optional tags. These variables help display useful information:
Tag | Function |
Referring URL | Shows the previous page the visitor was on |
Visitor’s IP Address | Displays the IP address of the visitor |
Requested URL | Displays the intended URL |
Server name | Shows your server name |
Visitor’s browser type | Detects the browser (e.g., Chrome, Firefox) |
Redirect Status Code | Displays status code ranges (300–307) |
Note: You don’t have to use all tags. They are optional and depend on how you want to customize error pages for your site.
Step 6: Save the File
- After editing, click Save.
By default, the file name will match the error number with a .shtml extension (e.g., 404.shtml). You can rename it, but only to an error code that will actually be displayed on your website.
Common Problems and Fixes
1. Still seeing the default error page?
Try refreshing your browser (Ctrl + F5). If the default error remains, update your .htaccess file in public_html with:
ErrorDocument 403 /403.shtml
ErrorDocument 404 /404.shtml
ErrorDocument 500 /500.shtml
2. Redirect to an existing page instead:
Example: Point all 404 errors to your home page.
ErrorDocument 404 /index.html
3. 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.
Tips for Managing Custom Error Pages
- Use cPanel’s File Manager to edit or delete existing error pages.
- Check visitor logs in cPanel (Awstats, Webalizer) to see which error codes occur most often.
- Always provide a link back to your home page in your custom design to help visitors navigate easily.
- Keep the design consistent with your website builder or theme for a seamless user experience.
Summary
Creating custom error pages in cPanel allows you to replace generic server messages with branded, user-friendly pages. By customizing common error codes like 404 or 500, you can guide visitors back to your home page, provide clear instructions and maintain a consistent website experience.
Write A Comment