How to Create a Custom Error Page in cPanel

When a visitor follows an old bookmark, mistypes a web address or arrives through a broken campaign link, an error page is often their first impression of your website. HostGator’s cPanel makes it possible to replace generic messages such as “404 Not Found” with a branded page that explains what happened and provides a useful next step.

A custom error page should remain clear on a small phone screen, load quickly and direct visitors towards your homepage, support contact or service pages. It also needs to preserve the correct HTTP status code so search engines and monitoring tools recognise the underlying error. The following process works with a standard cPanel account and can be adapted to the document root used by your HostGator domain.

Choose the Right Error Response

The first decision is which errors you want to handle. Most websites begin with a 404 page, then add pages for forbidden access and server faults.

Error code What it means Best response for visitors
404 The page or file does not exist Offer the homepage, search, popular sections and support
403 Access to the resource is denied Explain the restriction and provide an access or contact route
500 The server encountered an internal error Apologise, suggest retrying later and link to support
503 The service is temporarily unavailable Display expected downtime and contact alternatives

Start with a 404 page because it will handle missing files, renamed pages and invalid URLs. A 500 page requires more caution: its wording should acknowledge a temporary technical problem without exposing server paths, usernames, error codes or other internal details.

Find the Error Pages Tool

Sign in to the HostGator customer portal and open cPanel for the domain you want to manage. Use the search box at the top of cPanel and enter “Error Pages”. On many cPanel installations, the feature appears under Software, while some HostGator dashboards place it alongside MultiPHP Manager or another website-management section. Menu labels can vary between cPanel versions.

If several domains appear in cPanel, confirm that you are working within the correct account before opening the tool. HostGator customers with add-on domains may also have a separate document root, so check the Domains section rather than automatically assuming every site uses the main public_html directory.

The option may be hidden if the account has a restricted feature set or an older interface. HostGator’s knowledge base and video tutorials can help locate the relevant screen, while ticket support can confirm whether Error Pages is available on the particular plan. Make a backup of any existing custom error files before replacing them.

Prepare the Error Page Files

Create a separate HTML file for each status code you want to manage. These files can contain inline CSS, which prevents a missing stylesheet from creating another error. Keep the content simple enough to load immediately and ensure every link uses a complete path from the domain root.

Files to create

Content to include

A clean starting point for a 404 page looks like this:

<!doctype html>
<html lang="en-AU">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Page not found | Your Australian Business</title>
  <style>
    body {
      margin: 0;
      font-family: Arial, sans-serif;
      color: #202124;
      background: #f4f7fb;
    }
    main {
      max-width: 680px;
      margin: 12vh auto;
      padding: 32px;
      background: #ffffff;
      border-radius: 12px;
      box-sizing: border-box;
    }
    h1 { color: #143f85; }
    a { color: #143f85; }
    .code { font-weight: bold; color: #555; }
  </style>
</head>
<body>
  <main>
    <p class="code">Error 404</p>
    <h1>That page has gone walkabout</h1>
    <p>The address may be incorrect, or the page may have moved.</p>
    <p>
      <a href="/">Return to the homepage</a> or
      <a href="/contact/">contact our support team</a>.
    </p>
  </main>
</body>
</html>

Replace the sample business name, links and support information before uploading it. “That page has gone walkabout” gives the page a relaxed Australian tone, but the rest of the message should remain direct. If the design uses separate CSS or image files, use relative paths carefully and test them after every deployment.

Publish and Test Your Pages

Return to the cPanel Error Pages interface, select the appropriate status code and choose Edit. Depending on the cPanel version, this opens either an HTML editor or a File Manager view. Paste the prepared HTML into the editor, or select the uploaded file and open it for editing. Save the changes and return to cPanel to confirm that the correct file is attached to the code.

Test each error with a deliberately missing address, such as https://yourdomain.com.au/this-page-does-not-exist. The browser should display your design and return a genuine 404 response. Check the Network panel in browser developer tools to confirm the status code; displaying a custom message is not enough if the server incorrectly reports the page as successful. Repeat the test for 403, 500 and 503 responses where applicable.

Check every link, email address and support form from both desktop and mobile devices. If the old error page continues to appear, clear the browser cache and inspect any caching plugin or content-delivery network separately. Test the live domain rather than only a preview URL, since redirects, authentication rules and the selected document root can change the result.

Localise the Experience for Australia

Australian websites often use .com.au or .au domains, and an error page should link to the sections belonging to the correct local site. A Melbourne business and a Brisbane branch may share a HostGator account but use different domain folders. Domain purchase or transfer tools in the HostGator portal can also change these paths, so verify them whenever a domain moves.

Support hours matter as well. Sydney and Melbourne observe AEDT during daylight saving, while Brisbane remains on AEST throughout the year. Perth follows Western Australian time and is usually two hours behind Sydney, with an additional difference during daylight-saving periods. State the actual support hours instead of relying on vague wording such as “our team will be in touch shortly”.

The tone can be friendly without becoming informal to the point of confusion. Phrases such as “no worries” or “fair enough” may suit an Australian brand, but the main explanation should still identify the error and provide a route forward. Using Australian English, including words such as “organisation” and “authorise”, helps the page feel local and consistent with the rest of the site.

Campaigns can also create broken deep links when a promoted address changes. A content site such as an online roulette Australia guide may receive visitors through specific campaign paths, making a branded 404 page useful for returning them to relevant sections. If the page contains a form, explain what information is collected and link to a privacy notice consistent with the Australian Privacy Act and applicable Australian Consumer Law obligations.

Troubleshoot Upload and Display Issues

If cPanel continues to show the default error page, confirm that the file name matches the code exactly, including its .html extension. Check the domain’s actual document root, file permissions and any existing error-document directive. A file uploaded into the wrong directory may look correct in File Manager but never be selected by the server.

Developers who prefer an external client can work through HostGator FTP setup before uploading the files. Create a separate FTP account in cPanel, use the stated hostname and port, and change the password if the details ever appear in a shared support message. SFTP is preferable when the hosting account supports it because files travel over an encrypted connection.

Ordinary HTML files should normally use 644 permissions, while directories generally use 755. Avoid applying 777 permissions as a shortcut because it can expose the account to unnecessary modification. If the design appears without styling, check the browser console for broken asset paths, then confirm that every linked file exists. For a PHP form, also inspect the cPanel email log and the mail configuration rather than assuming the failure came from the error page itself.

Maintain the Error Page After Launch

Treat the error page as a maintained part of the customer journey. Review its links after a website redesign, domain transfer or major navigation change. Analytics can reveal the most common missing URLs, while HostGator’s support tickets and community forums may identify visitor questions that the page should answer. The HostGator knowledge base remains useful for checking cPanel changes that might affect file selection or error handling.

Billing and contact information should also be checked periodically. Australian customers should verify that invoices are issued in Australian dollars and that GST at 10% is shown where it applies. Keep contact forms and cPanel webmail routes current, but do not publish usernames, server details or internal email addresses that could assist an attacker.

The practical takeaway is to maintain one tested HTML file for each important error code in the correct document root, preserve the proper HTTP status, and review the page whenever the site structure, support details or Australian market requirements change.