How to Create Custom Error Pages in cPanel
Custom error pages replace the default browser error screens with branded pages that keep visitors on your site. A good 404 page can direct lost visitors to your homepage or search, rather than leaving them with a blank error screen.
Need help with your website setup?
Our team can help configure your hosting environment. Contact support →
Common Error Codes
- 400 — Bad Request
- 401 — Authorisation Required
- 403 — Forbidden (access denied)
- 404 — Not Found (most common — page doesn't exist)
- 500 — Internal Server Error
Method 1 — Using cPanel's Error Pages Tool
- Log in to cPanel.
- Go to Advanced → Error Pages.
- Select your domain from the dropdown at the top.
- Click the error code you want to customise (e.g. 404).
- The editor opens with the current error page content. Replace it with your custom HTML.
- Use the tag buttons at the top to insert dynamic variables such as:
- Referring URL — the page the visitor came from
- Requested URL — the URL that triggered the error
- Click Save.
Method 2 — Custom Error Pages via .htaccess
If your site is WordPress-based or you want more control, set error pages directly in your .htaccess file.
- Create your custom error page HTML files and upload them to your
public_htmlfolder. For example:404.html403.html500.html
- Open
public_html/.htaccessin File Manager (enable Show Hidden Files if needed). - Add the following lines:
ErrorDocument 404 /404.html
ErrorDocument 403 /403.html
ErrorDocument 500 /500.html
- Save the file.
Test by visiting a page that doesn't exist on your site — you should see your custom 404 page.
Custom Error Pages in WordPress
WordPress handles 404 errors through its own template system. To customise it:
- In your WordPress theme folder (
public_html/wp-content/themes/your-theme/), find or create a file called404.php. - Edit this file to create your custom page design — it can include your site's header, navigation, and a search box.
- Most WordPress themes already include a
404.php— edit it to match your branding.
Alternatively, plugins like 404page (free) let you set any WordPress page as your 404 template without coding.
What Makes a Good 404 Page?
- Your site's header and navigation (so visitors aren't stranded)
- A brief, friendly explanation ("We can't find that page")
- A search box
- Links to your most popular pages or homepage
- A contact link in case the broken link is important
Related Articles
Need help with website configuration?
Our team can set up error pages and other server settings for you. Get support →
