cPanel Custom Error Pages

Custom error pages in cPanel allow you to replace generic web server messages with helpful pages that match your website. They are commonly used for errors such as 404 Not Found and 500 Internal Server Error, but cPanel supports many other HTTP error responses.

A well-designed custom error page improves the visitor experience, explains what has happened in plain language and provides a useful next step. It does not fix the underlying problem that caused the error. For example, a custom 404 page does not restore a deleted file or repair a broken link.

What is a custom error page?

An HTTP status code is returned by a web server to describe the result of a request. A successful request normally returns a 2xx status code. An error response may indicate that content is missing, access is denied or the server encountered a problem.

When no custom page is configured, visitors may see a generic message that does not match the rest of your website. cPanel's Error Pages feature lets you create a more useful response for selected error codes.

Common examples include:

* 404 Not Found: The requested page or file could not be found.

* 403 Forbidden: The server will not allow access to the requested resource.

* 500 Internal Server Error: The server encountered an unexpected problem while processing the request.

* 503 Service Unavailable: The service is temporarily unavailable.

Before you begin

* Confirm that you can access the correct cPanel account.

* Identify the domain or website that the error page applies to if your account hosts multiple websites.

* Prepare the wording and any HTML you intend to use.

* If you add HTML or styling, make sure you understand the code and test it before using it on a live website.

* Plan a simple way for visitors to return to the homepage or another working section of the site.

How to create a custom error page in cPanel

1. Log in to your cPanel account.

2. Scroll to the Advanced section.

3. Select Error Pages.

4. If prompted, select the domain or website that you want to manage.

5. Select the error code that you want to customise, such as 404 or 500.

6. Enter the message or HTML content that you want visitors to see.

7. If available, select and insert one or more cPanel tags, such as the requested URL, to display dynamic information in the message.

8. Review the content for spelling, clarity and incorrect HTML.

9. Select Save.

10. Select Go Back to return to the list of error pages, if this option is displayed.

11. Repeat the process for any other error codes that you want to customise.

12. Test each page in a browser before considering the change complete.

Writing an effective error page

A useful error page should be brief, clear and focused on helping the visitor continue. Avoid technical explanations that are not useful to someone browsing your website.

Consider including:

* A plain explanation that the requested page is unavailable.

* A link to the homepage, if links are supported by your page design.

* A suggestion to check the web address for typing mistakes.

* Navigation to important sections of the website.

* Contact details or instructions for contacting your organisation, where appropriate.

Example message: The page you requested could not be found. Please check the address or return to the homepage.

For a 500 Internal Server Error page, avoid displaying server paths, software versions, stack traces or other technical information. This information can help an attacker and is generally not useful to visitors.

Best practices

* Match the branding, colours and general style of the rest of your website where practical.

* Keep the content readable on mobile devices.

* Use a clear heading and a short explanation rather than a large amount of text.

* Provide a useful next step instead of leaving visitors at a dead end.

* Do not expose passwords, file paths, database details, debugging output or other sensitive information.

* Test the page after saving it and confirm that it displays correctly.

* Review custom error pages after a website redesign or domain change.

* Make sure the custom page itself does not return another error or depend on missing files.

Testing your custom error page

To test a 404 page, open a URL within the correct domain that does not exist. To test another error page, use a safe testing method appropriate to your website and hosting configuration. Do not deliberately create a server failure on a production website unless you understand the consequences.

Check that the page:

* Displays the expected wording and design.

* Identifies the problem without revealing sensitive technical details.

* Provides a clear route to useful content.

* Loads correctly without missing images, stylesheets or scripts.

* Applies to the intended domain and does not unintentionally affect another website.

Troubleshooting

Error Pages is not visible in cPanel

Check the Advanced section and confirm that you are using the correct cPanel account. The available features can vary by hosting plan, cPanel theme and account configuration. Contact Apexhost Support if the option remains unavailable.

The custom page does not display correctly

Incorrect HTML, unsupported styling or references to missing files can affect the appearance of the page. Review the code and simplify the content. Test the page again after removing non-essential HTML, scripts and external resources.

The original error still occurs

This is expected when the underlying issue has not been resolved. A custom error page changes the message shown to visitors; it does not repair missing files, incorrect permissions, broken links, application errors or server-side faults.

The page applies to the wrong website

If the account manages multiple domains, return to Error Pages and confirm that you selected the intended domain before saving the change.

Changes are not visible immediately

Refresh the page and test in a private browser window. Browser, proxy or content delivery network caching may temporarily display an older version. Allow time for caching to expire before repeating the change.

Frequently asked questions

Can I customise only the 404 page?

Yes. You can customise one error type or configure several error pages according to the needs of your website.

Can I use HTML in a custom error page?

Yes. cPanel allows HTML content in the error page editor. Use simple, well-formed HTML and test the result carefully. Avoid relying on scripts or external resources that may not load when the website is experiencing an error.

Does creating a custom error page fix website errors?

No. It changes what visitors see, but the cause of the error must be investigated separately.

Should I log out of cPanel after making changes?

Yes. Log out when you have finished, particularly when using a shared or public computer.

Getting Started (cPanel)

Logging In (cPanel)

File Manager (cPanel)

AWStats (cPanel)

Need More Help?

If you require further assistance, contact Apexhost Support at support@apexhost.com.au.

 
 
 
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Getting Started with cPanel

This article introduces cPanel for Apexhost customers and explains what it is...

Logging into cPanel

cPanel is the main control panel used to manage Linux hosting services. If...

cPanel File Manager

File Manager in cPanel is a browser-based tool that allows you to view,...

cPanel Passwords

cPanel hosting passwords protect access to your hosting control panel, email...

cPanel Contact Information

Keeping your cPanel contact information up to date helps ensure you receive...