# Create custom error pages
Source: https://docs.webgee.com/en/hosting/how-to-create-custom-error-pages-in-cpanel



Show your own page instead of the bare Apache default when something goes wrong.
Applies to shared, reseller and Premium hosting.

The default pages are stark and carry no navigation, so a visitor who hits a
broken link usually leaves. A 404 with a search box and a link home does not
cost you the visit.

## Create one [#create-one]

1. In cPanel, open **Error Pages** under **Advanced**.
2. If your account has several domains, choose one from the **Managing** menu.
3. Select the status code — or **Show All HTTP Error Status Codes** for anything
   not listed.
4. Enter your content. Plain HTML works.
5. Save.

The buttons above the editor insert visitor-specific values such as the
requested URL or the referring page.

## The ones worth doing [#the-ones-worth-doing]

| Code    | When it appears                                          |
| ------- | -------------------------------------------------------- |
| **404** | Page not found. Much the most common — do this one first |
| **403** | Forbidden. Permissions, or a firewall rule               |
| **500** | Server error, usually an application fault               |
| **401** | Authentication required                                  |

A 404 page should include a link to your homepage, a search box if you have one,
and no dead ends. Avoid making it look like a working page — a visitor should
understand immediately that what they wanted is not here.

## WordPress and other applications [#wordpress-and-other-applications]

<Callout type="info">
  These pages apply to errors handled by the **web server**. WordPress serves its
  own 404 through its theme for any URL that reaches it, so your cPanel 404 will
  rarely be shown on a WordPress site — edit `404.php` in your theme instead.

  The cPanel version still matters for requests WordPress never sees, such as a
  missing file directly under a subdirectory.
</Callout>

## Check it worked [#check-it-worked]

Request a page that does not exist:

```bash
curl -sI https://example.com/this-does-not-exist | head -n 1
```

You want `404`, then check in a browser that your page is what appears.

<Callout type="warn">
  The status code must stay correct. An error page returning `200 OK` tells
  search engines the missing page exists, and they will index it — a "soft 404",
  which is worse than a plain error page.
</Callout>

## Related [#related]

* [Enable directory index listings](/en/hosting/enable-directory-index-listings-using-htaccess)
* [File and directory permissions](/en/hosting/what-file-and-directory-permissions-should-i-use-for-my-web-files)
