Get a free website with any plan

See how
HOSTING

Setting up custom error pages

IN SHORT

Custom error pages on Flashcloud shared or WordPress hosting are set through cPanel's Error Pages tool or an ErrorDocument line in .htaccess. WordPress sites are the exception: WordPress serves its own themed 404.php from the active theme, so cPanel's error page settings never apply to normal front-end 404s.

To set a custom error page on shared or WordPress hosting, open cPanel's Error Pages tool and edit the page for the status code you want (404, 500, and so on), or add an ErrorDocument line to your .htaccess file pointing at your own HTML file. If your site runs WordPress, skip both: WordPress already serves its own themed 404 page for missing URLs, and editing cPanel's error pages won't touch it.

Using cPanel's Error Pages tool

This is the fastest way to get a branded error page without touching server config files directly.

  1. Open cPanel from your hosting service. See Accessing cPanel if you need the way in.
  2. Find Error Pages under the Advanced section.
  3. Pick the domain, if you have more than one on the account.
  4. Choose the status code to customize. 404 (page not found) is the common one, but you can also set pages for 403 (forbidden), 500 (internal server error), and others.
  5. Edit the HTML in the box provided. cPanel gives you a set of placeholder tags (for the requested URL, the referring page, and so on) you can drop into the markup.
  6. Save.

This method writes the page for you and wires up the redirect, so there's nothing else to configure.

Using .htaccess directly

If you'd rather host your own error page file and point Apache at it manually, add a line like this to .htaccess in your site's root:

ErrorDocument 404 /errors/404.html

The path is relative to your document root. Upload the HTML file to that location first, either through the portal's file manager or an FTP/SFTP client. See Creating MySQL databases and the files tile in your service for background on getting files onto the server if you haven't used the file manager before.

You can repeat the ErrorDocument line for each status code you want to customize:

ErrorDocument 404 /errors/404.html
ErrorDocument 500 /errors/500.html
ErrorDocument 403 /errors/403.html

Keep the target file small and self-contained. Avoid pointing an ErrorDocument at a page that itself depends on a database call or a PHP include that could fail, since a broken error page produces a second error.

Absolute vs. relative paths

A path starting with / is relative to your document root, not the filesystem root, so /errors/404.html means public_html/errors/404.html on a typical account. You can also point ErrorDocument at a full URL (https://yourdomain.com/errors/404.html), which works but adds an extra DNS/HTTP round trip compared to a local path.

WordPress is different

WordPress intercepts requests through its own routing and serves 404.php from your active theme whenever nothing matches, before Apache's ErrorDocument setting ever gets a say for that domain's front end. To change what visitors see on a broken WordPress URL, edit or replace 404.php in your theme (a child theme, ideally, so an update doesn't wipe your changes) rather than setting cPanel's Error Pages tool. cPanel's 404 page will still apply to non-WordPress paths on the same domain, like a raw file request that 404s below the WordPress install, but not to normal front-end 404s.

When to contact support

If your .htaccess edit results in a server error on every page instead of only the missing-page case, or you're not sure whether a redirect loop is coming from ErrorDocument or from something else in .htaccess, open a ticket from the portal (Support → New ticket) or use live chat. A real person can check the error logs and tell you exactly which line is causing it.

Common questions

Why doesn't my custom 404 page show up on my WordPress site?

WordPress intercepts the request before Apache's ErrorDocument setting gets a say and serves 404.php from your active theme instead. Edit or replace 404.php in a child theme to change what visitors see, rather than using cPanel's Error Pages tool.

What's the fastest way to set up a branded error page?

Use cPanel's Error Pages tool, under the Advanced section. Pick the domain and status code, edit the HTML in the box provided, and save. cPanel writes the page and wires up the redirect for you.

Can I use my own HTML file for a 404 page instead of cPanel's editor?

Yes. Upload your HTML file to your site, then add a line like ErrorDocument 404 /errors/404.html to your .htaccess file. The path is relative to your document root, so /errors/404.html means public_html/errors/404.html on a typical account.

Why did my whole site break after I edited .htaccess for error pages?

A broken ErrorDocument target, like a page that depends on a database call or a PHP include that fails, can produce a second error instead of showing your custom page. Keep the target file small and self-contained, and open a ticket or use live chat if a server error is showing on every page instead of just the missing one.

Can I set different pages for 404 and 500 errors?

Yes. Add a separate ErrorDocument line for each status code you want to customize, for example one for 404, one for 500, and one for 403.

CAN'T FIND IT?

Real humans answer fast.

Hosting with us? Open a ticket and a real person replies - no scripts, no upsells. Still choosing a host? The same team is included with every plan, from day one.