Havenswift Hosting Ltd
All guides

Custom error pages

By default a missing page shows a bare server message. A custom error page keeps visitors on your site instead of leaving them at a dead end.

Setting them up

cPanel has an Error Pages tool for the common ones. Alternatively, put the files in your public_html and reference them in .htaccess:

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

Use a path starting with a slash, not a full web address – a full URL turns the error into a redirect and the browser then reports 302 rather than 404, which confuses search engines.

What a good 404 page does

The 500 page is different

Keep it plain HTML with no PHP, no database and no images from the site. If the server is erroring, anything clever will fail too and the visitor gets the bare message anyway.

Do not redirect all 404s to the home page

It is a common idea and a bad one. Visitors think the link worked and are confused about where they are, and search engines see pages that claim to exist but show something unrelated. A proper 404 is the honest answer.

Watch what is 404ing

Search Console lists them. A page appearing repeatedly usually means a broken link somewhere on your own site, which is worth fixing at the source.

Other guides

Still stuck? Sign in and raise a ticket, and somebody will answer it.

Sign in