StarDomain

How to Manage Error Pages (404, 500)

# How to Manage Error Pages (404, 500) Customise the error pages visitors see when something goes wrong on your website. ## Default Error Pages Web servers show default error pages for common errors: - **400 Bad Request** — the server cannot process the request. - **401 Unauthorized** — authentication required. - **403 Forbidden** — access denied. - **404 Not Found** — the page does not exist. - **500 Internal Server Error** — server-side error. ## Customising Error Pages in cPanel 1. Log in to cPanel. 2. Go to **Advanced** > **Error Pages**. 3. Select the domain. 4. Click the error code you want to customise (e.g., **404**). 5. Edit the HTML content. 6. Use the available tags: - ```` — the error code - ```` — the URL that caused the error - ```` — your domain name 7. Click **Save**. [screenshot: cPanel error page editor for 404] ## Customising via .htaccess For more control, use ``.htaccess``: 1. Create custom error pages (e.g., ``404.html``, ``500.html``) in ``public_html``. 2. Add to ``.htaccess``: ```apache ErrorDocument 404 /404.html ErrorDocument 500 /500.html ErrorDocument 403 /403.html ``` ### Example Custom 404 Page Create ``public_html/404.html``: ```html Page Not Found

404 - Page Not Found

Sorry, the page you are looking for does not exist.

Go to Homepage

``` ## WordPress Custom 404 WordPress handles 404 pages through your theme: 1. Create a ``404.php`` file in your theme directory. 2. Customise it with your site's design. 3. WordPress automatically uses it for missing pages. ## Best Practices 1. **Match your site design** — custom error pages should look like part of your website. 2. **Include navigation** — help visitors find what they need. 3. **Add a search bar** — especially on 404 pages. 4. **Link to homepage** — always provide a way back. 5. **Keep it helpful** — suggest popular pages or categories. ## Related Articles - [How to Use File Manager in cPanel](/knowledgebase/use-file-manager-cpanel) - [How to Fix 500 Internal Server Error](/knowledgebase/fix-500-internal-server-error) --- *Need help? Contact our support team at {{SUPPORT_URL}}/client/support.*