Tutorial · website-errors · Published 2026-08-16 · 3 min read

Build user facing error pages

User facing error pages: plan on-brand 404, 500 and 503 pages, know the server settings, and ship a good experience during downtimes.

What a good error page does

A good error page keeps the visitor in the site. It explains in one plain sentence what happened, offers the three or four paths the visitor actually uses (home, contact, search), and it does not leak a stack trace. The error page has a job beyond aesthetics: it converts a dead end into a soft landing.

The three statuses that deserve human copy are the ones real visitors see:

StatusMeaningPage job
404That URL does not existOffer the real alternatives
500The server failedA back-to-earth message so the visitor retries
503The site is down on purposeExplain it, retry header, no panic

Map the server handlers

Error pages live at the platform layer so you do not hand-craft an HTML copy per route. On Apache you map them in .htaccess or vhost; on nginx you declare a location that serves the page; on Cloudflare the platform lets you configure a Custom Error Page for specific origin statuses.

error_page 404 /pages/404.html;
error_page 500 502 503 504 /pages/500.html;
location = /pages/404.html { internal; }
location = /pages/500.html { internal; }

Two rules keep this healthy:

The layout

Keep your brand, but drop JavaScript. A visitor facing 500 already has a fragile asset pipeline; your fallback page must survive CSS and JS failure.

Worked example (404)

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Page not found | Example</title>
</head>
<body>
  <h1>This page has moved or does not exist</h1>
  <p>Try one of these instead.</p>
  <p><a href="/">Home</a> · <a href="/about/">About</a> · <a href="/contact/">Contact</a></p>
  <link rel="stylesheet" href="/style.css">
</body>
</html>

The browser gets the real 404 status (not a 200), so search engines and analytic tools behave correctly. The page then links the visitor to viable destinations without dwelling on the error.

Headline checks

When to involve a professional

If the platform only lets you change one shared error page (some hosts, some CMS stacks), and you need different pages for 404 vs 503, that is a platform/tier decision, not a copy task. Ask your host for one more status page slot before building custom HTML.

Keep the copy plain and factual on every one of your error pages: the visitor should know it is a real outage, not their connection, and that the team is on it.

Need a website built, fixed, optimised, migrated or replaced?

This technical resource is written by CSMBAC, a small design and development studio. If you would rather hand the problem to a professional, the website service page explains how we build enquiry-ready websites.

Explore website services