
404 and Error Page Design: Recovery Patterns
404, 500, network, and maintenance each call for a different response. A practitioner's guide to recovery — site search, retry buttons, auto-retry, and the HTTP 503 contract.
TL;DR: Error pages are recovery tools, not decorations. 404, 500, network, and maintenance each call for a different response — the 404 needs site search and suggested destinations, the 500 takes responsibility and offers retry, the network state should be an inline banner with auto-retry and cached form data, and a maintenance page for a short outage should return HTTP 503, ideally with a Retry-After header, so search engines do not index the notice as the page content. Match tone to the rest of the product, localize all copy, and never strand a user on a single broken link.
Error pages are easy to overlook in design work. Broken links accumulate across years. Expired URLs can stay in search results for a while after the content has moved. Network drops happen on subway platforms and in conference centers. Servers fail in ways that are no one user's fault. The team that treats 404.html as a one-time decoration and never touches the other three error categories risks losing traffic, trust, and search visibility on those events.
This article is part of the web UX patterns guide. It covers the working detail of the error pages section in the main guide.
Error pages are recovery tools, not decorations
A useful framing for error-page design is to stop calling them "error pages" and start calling them recovery screens. The error has already happened; what the screen does next decides whether the user stays or leaves.
This article covers four error categories. Each one is a different product moment with a different recovery path.
| Error type | What happened | Primary recovery action |
|---|---|---|
| 404 | The URL did not match anything | Site search, suggested destinations |
| 500 | Server-side failure | Retry, go home, status page link |
| Network | Connectivity lost on the client | Inline banner, auto-retry, cache form data |
| Maintenance | Planned downtime | Communicate scope and ETA; return HTTP 503 for a short outage |
Shipping the same screen for all four — a generic "Something went wrong" page — tells the user nothing about what to do next. The recovery path is the screen's job, and the recovery path is different for each category. The Nielsen Norman Group guidelines on error messages are a useful reference: they advise describing the exact problem so users understand what happened, in language familiar to users rather than technical jargon, because a user's mental model of the system likely differs from how it was coded.
404: "we do not have that page"
A 404 user can be recovered when they still want something the site has. The page that lost them is usually adjacent to a page that would answer them. The 404 screen's job is to surface that adjacent path.
The first move is honest acknowledgment: confirm that the URL was the issue. Showing the path the user landed on — /blog/the-article-you-were-looking-for — does two things at once. It tells the user where the system thinks they wanted to go, and it surfaces typos the user can correct in the address bar. The acknowledgment should be brief and unapologetic: That page is not here.
The second move is site search, presented prominently. The user knows what they were looking for; a search box gives them a direct path to find it under a different URL. Wire the search input as the visual anchor of the page, not as an afterthought below the apology. For sites with structured navigation, a short list of suggested destinations (for example, three to five) — the homepage, the top-level category pages, the most-trafficked article hubs — round out the recovery options.
The third move, when content is available, is dynamic suggestion. Recently published posts, trending categories, or content related to the broken URL by slug similarity all give the user a path back into the product. Static decoration on a 404 — a clever illustration with no recovery options — can cost the user trust and the site a session. The Smashing Magazine showcase of 404 pages is dated in its visual examples but still useful on what works structurally — a search box and a list of useful destinations.
500 and server errors: "we broke"
A 500 error is the system telling the user that something on the server failed. The user did nothing wrong, and the screen needs to make that clear before doing anything else.
Take responsibility in the first sentence. Something on our end is not working reads very differently from Sorry for the inconvenience or, worse, Oops! The first acknowledges the failure as the system's. The second deflects. The third trivializes.
Offer retry as the primary action. A button that re-issues the request is enough on a stateless GET; a button that explicitly preserves user input is necessary on a POST. A secondary link back to the homepage gives the user an escape if retry keeps failing. If you operate a public status page, link to it from the 500 — users who check can see a known incident instead of a silent failure.
Stack traces and technical jargon do not belong on a user-facing 500. The exception class, the database error, the request ID — all useful for engineering, all noise for the user. Internal IDs that help support correlate the incident (Reference: 7f3a-2e1b) are fine when shown as small footnotes, not as the screen's headline.
The harder case is the partial failure — one API request inside an otherwise functional page returned 500. That state is not a full-page 500 and should not be designed as one. An inline error within the affected widget, with retry scoped to that widget, keeps the rest of the page usable.
Network errors: "check your connection"
Network errors are the only error category where the client knows the cause and the server does not. The user lost connectivity; the system on the other end may never have received the request, or may have received it before the response was lost. The recovery pattern is different from 404 and 500 because the page does not need to load anything new — it needs to handle the loss gracefully and resume when conditions improve.
Use the browser's online and offline events on the window object as a first signal of connection loss, and treat failed requests as the confirmation — the HTML Standard notes that navigator.onLine is inherently unreliable, because a computer can be connected to a network without having Internet access. The Network Information API adds bandwidth and connection-type hints, but it is not Baseline — as of Nov 2026 (web-features data) it ships only in Chromium-based browsers, not in Firefox or Safari — so treat it as an optional enhancement. The screen response should be an inline banner, not a full-page replacement — replacing the page on a transient network blip destroys the user's place in the product and may not recover cleanly.
Auto-retry when connectivity returns. The online event fires when the browser regains a network connection; the right pattern is to queue the failed request, listen for the event, and retry once with a clear visual indicator that the retry is in progress. For a non-idempotent request such as a POST, RFC 9110 says a client SHOULD NOT retry automatically unless it has some means to know that the request semantics are actually idempotent, regardless of the method, or some means to detect that the original request was never applied. Without such a means, ask the user before resending. A second failure after the retry escalates to a more persistent inline error with manual retry as the next step.
Cache form data locally before submission. The user who lost connection while filling a long form has already done the work; losing it to a network blip is a preventable form of data loss in product UI. localStorage for low-sensitivity drafts, IndexedDB for richer documents, and sessionStorage for ephemeral state that only needs to survive a reload in the same tab (it is cleared when the tab closes) cover the practical range. The cached draft should clear automatically on successful submission. Drafts kept in localStorage or IndexedDB can then surface a recovery prompt — You have a saved draft from earlier — on the next visit.
Maintenance pages: communicate, do not apologize
Maintenance pages exist for planned events: a deploy with database downtime, a scheduled upgrade, an incident response window. The user has not encountered a bug — the site has been intentionally taken offline. The screen should reflect that.
Tell the user that the downtime is planned, not broken. We are running a scheduled upgrade is different from Our site is having problems. Where you know the return window, communicate it: Expected to be back by 2:00 PM UTC lets the user decide whether to wait or come back later. Where you do not, point to a status page or social channel for live updates.
The technical contract matters as much as the copy. A maintenance page for a short planned window should return HTTP 503, with a Retry-After header indicating when the service expects to resume whenever that time is known. The MDN reference on 503 Service Unavailable says the Retry-After header should contain the estimated time for the recovery of the service, if possible, and notes that 503 responses should not usually be cached. Google's January 25, 2011 Search Central post on planned downtime said that a 503 tells crawlers the downtime is temporary and that Googlebot may use an optional Retry-After header to determine when to recrawl the URL. Google now labels that post as possibly outdated and points to its current best practices for temporarily disabling a site. Those current guidelines strongly recommend limiting site functionality over disabling a site entirely. If a site has to be disabled urgently for one to two days, they say to return an informational error page with a 503 status code instead of all content, and their best practices include a Retry-After header with a best-effort date or duration; for a longer closure, they say to provide an indexable placeholder homepage with a 200 status code. Google's current crawler documentation on HTTP status codes adds that 5xx responses temporarily slow crawling and that URLs which persistently return server errors are removed from the index — so a 503 is for planned windows, not a long-term state. During a short maintenance window, a 200 response risks the search engine indexing your maintenance notice as the content for the URL — a mistake that can outlast the deploy.
The maintenance page should not link to internal product paths that are also down. Linking only to status, social, and external help channels keeps the user from bouncing between two broken doors.
Tone, illustration, and localization
Tone on an error page is the same tone the rest of the product uses, dialed slightly lower. A product that uses warm conversational copy throughout can carry a slightly warmer 404. A product that uses precise institutional copy throughout cannot, and trying makes the error screen read as out of character.
Two failure modes recur. Playful tone on serious products — financial, medical, legal, operational — reads as unprofessional when a user is already frustrated. Pet language — Oopsie!, Whoops!, Yikes! — can undermine trust in any product category, particularly on a 500 where the system has actually failed. Plain phrasing that names who is responsible (we) can read as more professional than an exclamation such as oops, and it can be easier to translate.
Illustration on error pages is optional in every case. A clear recovery path is mandatory. Where illustration ships, the same constraints as other empty states apply — a small file-size budget per asset (our working rule of thumb is under thirty kilobytes), prefers-reduced-motion aware, culturally neutral. The illustration should never be the page's load-bearing element; if the illustration loaded and the recovery actions did not, the page failed.
Localize all copy, including alt text on any illustrations and the strings inside auto-retry indicators. An English-only 503 page on a multilingual product greets users with a language switch on the worst possible screen. Products that launch in English only should still wire the error templates through the localization pipeline so the strings can be backfilled without revisiting the template.
Diagnostic checklist for the next planning cycle
- Audit your error templates and confirm you have distinct screens for 404, 500, network, and maintenance.
- Add a prominent site search input to your 404 page if it does not already have one.
- Rewrite your 500 copy to take responsibility in the first sentence and offer retry as the primary action.
- Wire
onlineandofflinelisteners, backed by failed-request detection, to show an inline network banner with auto-retry, and persist form data tolocalStoragebefore submission. - Confirm your maintenance page for a short outage returns HTTP 503 with a
Retry-Afterheader rather than 200, and plan an indexable placeholder page for a longer closure. - Read every error-page string out loud in the voice the rest of the product would use to deliver bad news — replace anything that sounds out of character.
Four error types, four different recovery paths. The decorations are optional; the paths are not.