Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to make your own 404 error page in cPanel

This guide shows you how to replace the plain "Not Found" page with a friendly page of your own.

cPanel2 min read13 steps5 screenshots

What is a 404 error?

A 404 error means a visitor asked for a page that does not exist. Maybe they typed the wrong address. Or you moved a page. The server shows a plain error page. A custom page can explain what happened and send people to your home page.

Method 1: The Error Pages tool

  1. Log in to cPanel.
  2. In the Advanced section, click Error Pages.
    cPanel
    cPanel - Error Pages
    cPanel - Error Pages (404)
  3. If you have several domains, pick the one you want.
  4. Click 404 (Not Found).
  5. In the big box, type your message in HTML. HTML is the language of web pages. Here is an example.
    <h1>Oops! Page not found</h1>
    <p>We could not find that page.</p>
    <p><a href="/">Go to the home page</a></p>
  6. Click Save.

cPanel makes a file called 404.shtml in your public_html folder.

Method 2: Use the .htaccess file

The .htaccess file holds rules for the Apache web server. A mistake in it can break your site. Take a backup first.

  1. Make your own page, for example notfound.html, in public_html.
  2. Open File Manager. Turn on Show Hidden Files in Settings.
  3. Right-click .htaccess in public_html and choose Edit.
  4. Add this line at the end.
    ErrorDocument 404 /notfound.html
    This tells Apache to show your page for every 404 error.
  5. Click Save Changes.
    cPanel - Custom Error Page Space

Test it

  1. Open your site with a wrong address, such as yourdomain.com/this-page-is-not-here.
  2. You should see your custom page.
    cPanel - Error Pages Success

Ideas for a good 404 page

  • Keep the words short and kind.
  • Add a link to the home page.
  • Add links to your main sections.
  • Do not load heavy images.
Tip: WordPress sites use their theme's 404 template. Edit that instead, or the rule above may not work.

Quick recap

  • A 404 error means the page was not found.
  • Use Error Pages in cPanel for the easy way.
  • Or add an ErrorDocument 404 line to .htaccess.
  • Test with a wrong address.