Website Examples
404 Page Examples: 18 Real 404 Pages and What to Copy
18 real 404 page examples checked on 2026-12-03 for HTTP status, search, home and contact links, plus soft 404s we found and a copyable HTML 404 template.
A good 404 page says plainly that the page is missing, keeps your normal header and footer, offers a way forward (a home link, a search box, a few popular pages, a contact route), and comes back from the server with a real 404 HTTP status. This page collects 18 real 404 page examples from small businesses, blogs, software companies, and nonprofits. We requested a made-up URL on each site on 2026-12-03, recorded the status code the server returned, and describe only what was in the HTML that came back: the headline, the links, the search box, and the contact details. After the examples come the soft 404s we found while checking 215 sites, a copyable HTML 404 template, server settings for Apache, Nginx, and Next.js, a checklist, and answers to the question people keep asking in forums: why not redirect to the homepage? It is part of the website examples library.
Jump to: the comparison table · examples by type · patterns · soft 404s · redirect to the homepage? · HTML template · server settings · checklist · FAQ
What makes a good 404 page?
A useful custom 404 page has seven parts:
- A clear message: "Page not found", or a headline in your brand's voice followed by one plain sentence
- Your normal header and footer, so the menu is still there
- A home link
- A search box, if your site has search
- Three to ten links to the pages most visitors want (Stripe shows six cards, Feeding America lists seven tasks)
- A contact route: a phone link, an email address, or a way to report the broken link
- A real
404status code from the server, so search engines drop the URL instead of indexing the error page
Google's list is close to this one. Its crawling errors documentation says: "Tell visitors clearly that the page they're looking for can't be found. Use language that is friendly and inviting." It adds: "Consider adding a search box and links to your most popular articles or categories, as well as a link to your site's home page", and "Think about providing a way for users to report a broken link."
404 page examples at a glance
Every site below was requested on 2026-12-03 at <site>/bwe-missing-page-check-20261203, a path that exists on none of them, with curl -sIL (the chain of response headers) and curl -sL (the HTML), using a Chrome user agent. "HTTP status" is the final status code. "Search" means a search form in the HTML of the 404 page: "In page" when it is part of the 404 message, "Header" or "Footer" when it is the site-wide one.
| 404 page | Type | HTTP status | Search | Home link | Suggested links | Contact | What to copy |
|---|---|---|---|---|---|---|---|
| Dashing Maids | House cleaning, Denver | 404 | No | "Back Home" | None (full menu kept) | "Call (720) 924-6513" button | A call button beside the home button |
| Franklin Barbecue | Barbecue restaurant | 404 | No | "back home" | None (full menu kept) | None (phone in the footer as text) | Two lines in the brand's voice and one button |
| sweetgreen | Restaurant chain | 404 | No | "Return Home" | None (full menu kept) | None | One line, one button, one large image |
| Neil Kelly | Remodeler | 404 | Header | "Back to Home" | None | Phone link in the header | A sentence that names the likely cause |
| Schweiger Dermatology | Dermatology group | 404 | Header | "Return to the homepage" | None | Call and book links beside the message | Booking next to the error |
| Smitten Kitchen | Food blog | 404 | In page | None (logo and menu) | 5 recent posts, 10 popular in the sidebar | "let us know?" (report a broken link) | Recent posts, search, and a broken-link report |
| Ethan Marcotte | Personal site and journal | 404 | No | None (menu kept) | 5 recent posts with teasers | "drop me a line" | A first-person contact line |
| Jessica Hische | Lettering and illustration studio | 404 | In page | None (menu kept) | 6 section links, 4 service cards | "Let’s Make Something" card | Service cards on the error page |
| The Blonde Abroad | Travel blog | 404 | In page | None (menu kept) | 5 links, 4 image tiles | None (footer only) | A theme taken from the site's subject |
| Daring Fireball | Blog | 404 | Footer | None (logo and sidebar) | None | Sidebar "Contact" link | Printing the missing path |
| Stripe | Payments software | 404 | No | "homepage" in the sentence | 6 cards | "Support" card | "Try one of these" and a card grid |
| Calendly | Scheduling software | 404 | No | "Visit homepage" | 5 product cards below | "Contact us" button | Home and contact buttons side by side |
| Oh Dear | Website monitoring | 404 | No | "Back home" | None | "Contact support" email in the footer | A link to the status page |
| Dribbble (dribbble.com) | Design community | 404 | Footer | None (logo only) | A collage of designs, loaded by script | "Contact us" in the top bar | Showing your best content on the 404 |
| Feeding America | Hunger-relief nonprofit | 404 | Header (script-built) | "Return to our homepage." | 7 task links, donate included | None (footer only) | A mission line and the top tasks |
| Best Friends Animal Society | Animal welfare nonprofit | 404 | In page | "Go to our home page" | 5 links, donate included | None | Search first, then five tasks |
| SF-Marin Food Bank | Food bank | 404 | In page | None (menu kept) | None | None | The minimum: message, search, menu |
| National Park Service | U.S. government agency | 404 (after 1 redirect) | Header | "Visit homepage" | None | None | An example of a correct URL |
Sites change, so a page may look different when you open it. To see any of them, add a made-up path to the domain.
18 real 404 pages by type
The descriptions below are limited to what is in each page's HTML. Text in quotation marks is copied from the page.
Small business 404 pages
Two of the five small business pages put a phone number or a booking link right next to the message; the other three keep the full menu and footer around a short message.
Dashing Maids: dashingmaids.com
| Field | Observation |
|---|---|
| Status | 404 |
| Message | A large "404", the headline "This Page Got Swept Away", and a line that starts "We couldn't find that page." |
| Buttons | "Back Home" (to /) and "Call (720) 924-6513" (a tel: link) |
| Around it | The full header (services menu, phone number, "Get A Quote") and the footer stay on the page |
| What to copy | A pun from your own trade in the headline, and a phone button for the customer who would rather ask |
Franklin Barbecue: franklinbbq.com
| Field | Observation |
|---|---|
| Status | 404 |
| Message | "dagnabbit!" and "the page you're looking for seems to have gone missing." |
| Buttons | One: "back home", which points to /home |
| Around it | The menu (Visit Us, Menu, Private Events, Sauces & Rubs, About) and the footer with the address and hours |
| What to copy | Two lines of copy in the brand's voice and one button. The site runs on Squarespace (the HTML carries Squarespace's markup) and still returns a real 404, so a custom page there does not cost you the status code |
sweetgreen: sweetgreen.com
| Field | Observation |
|---|---|
| Status | 404 |
| Message | "Oops! Nothing to see here." and a large image with the alt text "Not Found". No paragraph |
| Buttons | "Return Home" |
| Around it | The header menu (Outpost, Catering, Locations, Order) and a footer that opens with a newsletter card. The page has a noindex, nofollow robots tag |
| What to copy | Very little text, but the menu stays, so the Order link is one tap away |
Neil Kelly: neilkelly.com
| Field | Observation |
|---|---|
| Status | 404 |
| Message | "Page Not Found" and "Sorry, the page you’re looking for doesn’t exist or has been moved. Let’s get you back on track." |
| Buttons | "Back to Home" |
| Around it | The header keeps the site search ("Search…") and a phone link labelled "Call 503-288-7461"; the footer lists services and resources |
| What to copy | One sentence that names the two likely causes, moved or deleted |
Schweiger Dermatology: schweigerderm.com
| Field | Observation |
|---|---|
| Status | 404 |
| Message | "404" and "Sorry, but you are looking for something that isn't here." |
| Links | "Return to the homepage" |
| Beside it | A "Make an Appointment" box with "Call: 212-283-3000" (a tel: link) and "Book Appointment" |
| What to copy | The booking box. A patient who followed a broken link still wants an appointment |
Blog and creator 404 pages
Blogs have the most to offer on a 404 page, because the visitor came for writing and there is always more of it.
Smitten Kitchen: smittenkitchen.com
| Field | Observation |
|---|---|
| Status | 404 |
| Message | "Whoops!" then "I think I gave you bad directions. Maybe you were looking for something recent?" |
| Links | A "Recent Posts" list of 5 recipes, a search form under "Maybe you need to search further?", and "Maybe you landed on a broken link and want to let us know?" with a link to the contact page |
| Extra | A closing line about chocolate cake with a linked photo, and a sidebar with "Popular Right Now" (10 recipes) and a monthly archive |
| What to copy | The broken-link report. It is the one example here that asks visitors to report the bad link, as Google's tips suggest |
Ethan Marcotte: ethanmarcotte.com
| Field | Observation |
|---|---|
| Status | 404 |
| Message | "Hmm. Couldn’t find anything there." then "Terribly sorry, but it doesn’t look like there’s much here." |
| Links | "please drop me a line if I can help you find something" (to the contact page), then five recent posts, each with a date and a one-line teaser |
| Extra | A newsletter form headed "Subscribe to my newsletter" |
| What to copy | A first-person contact line. On a one-person site, writing to the owner is the fastest search there is |
Jessica Hische: jessicahische.is
| Field | Observation |
|---|---|
| Status | 404 |
| Message | "Well, this is awkward." with a line saying the page does not seem to exist |
| Links | A search box ("Search for something..."), six section links (Portfolio, Work with Me, Resources, Blog, About, Shop), and four cards: "Let’s Make Something", "Book a Session", "Learn with Me", and "Join Studioworks" |
| What to copy | Cards that describe what you offer, so a lost visitor still sees the services |
The Blonde Abroad: theblondeabroad.com
| Field | Observation |
|---|---|
| Status | 404 |
| Message | "You're Lost" above the headline "Refer to the map below to get back on track.", with a compass graphic |
| Links | A "Search our website" box; "More helpful links" (Travel Shop, Female Travel, Photography, TBA Escapes, Lightroom Presets); four image tiles for Destinations, About Me, Blog, and Packing Guides |
| Around it | The full menu and footer, and a noindex, follow robots tag |
| What to copy | A 404 theme taken from the site's subject: a travel blog uses a map and a compass |
Daring Fireball: daringfireball.net
| Field | Observation |
|---|---|
| Status | 404 |
| Message | A 160-pixel "404", then "The requested URL does not exist on Daring Fireball:", the missing path in code type, and "Sorry about that." |
| Links | None in the message; the sidebar menu and the footer search stay |
| What to copy | Printing the requested path, so a visitor who mistyped it can see the typo |
SaaS and product 404 pages
Software companies treat the 404 as a routing page: documentation, status, support, and the product.
Stripe: stripe.com
| Field | Observation |
|---|---|
| Status | 404 |
| Message | "Page not found" and "We couldn't find that page. Visit our homepage, or try one of these." |
| Links | Six cards, each with one line of description: Pricing, Careers, Documentation, API Reference, System status, and Support |
| Around it | The full Stripe header and footer |
| What to copy | A small grid of the most-visited destinations, each with one line saying what is there. The SaaS website examples show the same destinations in the main navigation |
Calendly: calendly.com
| Field | Observation |
|---|---|
| Status | 404 |
| Message | "Sorry, we can’t find that page". The line under it is product copy ("One-click access to Calendly anywhere on the web"), not an explanation |
| Buttons | "Visit homepage" and "Contact us" |
| Below | "There’s more to meetings than finding a time" with five product cards: Scheduling, Callie, Notetaker, Contacts, and Payments |
| What to copy | Two buttons, home and contact, side by side |
Oh Dear: ohdear.app
| Field | Observation |
|---|---|
| Status | 404 |
| Message | "404", "Oh Dear, this page is missing." and "We couldn't find the page you're looking for. Check the address for a typo, or head back home." |
| Links | "Back home", and "Looking for an update? Check our service status" with a link to the status page |
| Around it | A stripped-down page: the logo, the message, and a footer with "Service status" and "Contact support" (an email link). No main menu |
| What to copy | A status page link, for any product whose visitors may arrive because something looks broken |
Dribbble: dribbble.com
| Field | Observation |
|---|---|
| Status | 404 |
| Message | "Whoops, that page is gone." and "While you’re here, feast your eyes upon these tantalizing popular designs matching the color", followed by a color chosen by a script |
| Links | The "404" is drawn as a collage of popular designs. The designs load by JavaScript, so they are not in the HTML |
| Around it | The logo, "Contact us", and a footer search ("Search for design or designers"). No main menu |
| What to copy | Using the 404 to show your best work. Keep a plain link or two in the HTML as well, since the collage depends on a script |
Nonprofit and public-service 404 pages
Two of the four pages below repeat the site's main tasks (finding help, giving) on the error page; the other two keep it to a message, search, and the menu.
Feeding America: feedingamerica.org
| Field | Observation |
|---|---|
| Status | 404 |
| Message | A headline that ties the empty page to empty tables, then "Every person deserves to have enough to eat. While we work together to make that a reality, let's get you where you need to go:" |
| Links | Seven: find a local food bank, learn how we're fighting hunger, take action, donate, learn about hunger in America, resources for network members, and "Return to our homepage." |
| Note | The 404 content is a page in the site's CMS (its canonical tag points to /page-empty-no-ones-table-should-be) and carries a noindex tag; missing URLs still get a 404 |
| What to copy | The mission in one line, then the site's top tasks as a short list. The nonprofit website examples cover the rest of a nonprofit site |
Best Friends Animal Society: bestfriends.org
| Field | Observation |
|---|---|
| Status | 404 |
| Message | "Oops! The page you’re looking for is out chasing the wrong ball" and "We’re happy to fetch a different one for you.", with a photo of a dog |
| Links | A "Search bestfriends.org" box, then "Go to our home page", "Help save lives by donating today", "How you can bring love home", "Keep your pet healthy and happy", and "Locations" |
| Around it | A standalone page: the logo and a short footer, no main menu. A "latest stories" block is filled in by script |
| What to copy | Search first, then a short task list that includes the donate link |
SF-Marin Food Bank: sfmfoodbank.org
| Field | Observation |
|---|---|
| Status | 404 |
| Message | "Oops! That page doesn't exist." then "It looks like nothing was found at this location. Maybe try a search or look through the navigation?" (the stock WordPress theme wording) |
| Links | A search form in the message; the full menu with "DONATE" stays in the header |
| What to copy | The minimum that works: an honest message, search, the normal menu, and a real 404 |
National Park Service: nps.gov
| Field | Observation |
|---|---|
| Status | 404, after one redirect that adds /index.htm to the path |
| Message | "Page not found" and "We're sorry, we can't find the page you're looking for. The site administrator may have removed it, changed its location, or made it otherwise unavailable." |
| Help | "If you typed the URL directly, check your spelling and capitalization. Our URLs look like this:" followed by an example, then a "Visit homepage" button and "Error code: 404" |
| What to copy | The URL pattern. People who type addresses by hand learn the format from the error page |
What the 18 pages have in common
The counts come from the table above, 18 pages checked on 2026-12-03.
- All 18 return a real
404. They were chosen from the 190 sites that did, out of 215 checked (next section). - 11 of 18 put a home link in the message. The other 7 (Smitten Kitchen, Ethan Marcotte, Jessica Hische, The Blonde Abroad, Daring Fireball, Dribbble, SF-Marin Food Bank) rely on the logo and the menu.
- 11 of 18 have a search form on the page. 5 put it inside the 404 message (Smitten Kitchen, Jessica Hische, The Blonde Abroad, Best Friends, SF-Marin Food Bank); 6 leave it in the header or footer, including Feeding America's script-built search box.
- 8 of 18 suggest pages. Stripe, Calendly, Feeding America, and Best Friends pick tasks (5 to 7 links each); Smitten Kitchen and Ethan Marcotte pick recent posts; Jessica Hische and The Blonde Abroad pick site sections.
- 6 of 18 put a contact route in or beside the message: Dashing Maids and Schweiger Dermatology (call or book), Smitten Kitchen (report the broken link), Ethan Marcotte (write to me), Calendly (Contact us), and Stripe (Support). Only Smitten Kitchen asks for the broken link.
- 15 of 18 keep the normal header and footer. Oh Dear, Dribbble, and Best Friends use a standalone page.
- 7 of 18 also add a
noindexrobots tag. With a real 404 it changes nothing for Google, which does not index URLs that return a 4xx status, but it does no harm. - The jokes come with a plain line. Franklin Barbecue's "dagnabbit!" is followed by "the page you're looking for seems to have gone missing", and Dashing Maids' pun is followed by "We couldn't find that page." That is good 404 page design in one rule: be as playful as your brand, then say what happened.
Soft 404s we found: status codes on 215 sites
A design gallery shows what a 404 page looks like. What the server returns with it is the part search engines read, so we checked that too.
Method. For the 215 external sites cited on our website examples pages, we requested a URL that does not exist and recorded the final HTTP status, the redirects, and the HTML title.
- 2026-11-26 (from our research brief):
<site>/bwe-missing-page-check-20261126withcurl -sL, Chrome user agent, 15-second timeout - 2026-12-03 (re-run for this page):
<site>/bwe-missing-page-check-20261203withcurl -sL(GET) andcurl -sIL(HEAD), Chrome user agent, 20-second timeout
| Result | 2026-11-26 | 2026-12-03 (GET) |
|---|---|---|
Real 404 status | 194 of 215 | 190 of 215 |
| Of those, 404 pages with a search form in the HTML | 66 | 65 |
Redirect to the homepage, which returns 200 | 4 | 4 |
Redirect to a separate error page that returns 200 | 2 | 2 |
200 at the requested URL (directly or after a language redirect) | 4 | 4 |
| Not measurable: bot wall, server error, or no DNS | 11 | 15 |
The search count matches type="search", role="search", name="q", or name="s" anywhere in the HTML, so a site-wide header search counts. The four sites that dropped out of the 404 column since November now return 403 to our requests (three bot walls) or 502; none of them switched to a soft 404. None of the 190 real 404 pages has a meta refresh tag (the six pages that do are all bot-check pages).
The soft 404s, by kind
Each site below was requested again on 2026-12-03, and the statuses are from that day.
- Redirect to the homepage: freakonomics.com (
302to/), paulgraham.com (302), casedesign.com (301), and thealtmanbrothers.com (302). Each lands on the homepage with a200and the homepage title. A visitor who followed an old link gets the front page and no explanation. - Redirect to an error page with its own URL: hammerandhand.com answers a missing URL with a
301to/404-page/, which returns200with the title "404 - Hammer & Hand", a robots tag of "index, follow", and a canonical tag pointing to itself. The page says "It looks like the link you’re looking for doesn’t exist. Sorry about that!", so a search engine sees an indexable page that says it does not exist. portfolio.adobe.com sends a302to/error, which returns200with the generic Adobe Portfolio title and no error text in the HTML. - A page titled "404" served with
200: rogerlmartin.com returned200on 2026-11-26 with the title "404". In our first GET on 2026-12-03 it did the same, with "Page not found." and "Sorry, the page you are looking for cannot be found. Please check the URL and try again." Five later GET requests the same day returned404with a JSON body, and the HEAD request returned404. One URL, two answers, which is why the checklist below says to test more than once. 200with anoindextag: cursor.com returned200with<meta name="robots" content="noindex"/>and Next.js's not-found marker (NEXT_HTTP_ERROR_FALLBACK;404) in the HTML. That matches the Next.js documentation: "Before streaming starts, Next.js returns a 404 status code. After streaming starts, the status code remains 200 and the not-found UI renders in the response." The noindex keeps it out of the index; the status code still says the page exists.- App shells we could not classify: linear.app and pret.co.uk (after a
301to/en-GB/...) returned200with a page that a script fills in. The HTML has no not-found text, so we cannot tell from it what a visitor sees, and we do not count them as soft 404s.
One more finding for anyone who tests with curl -I alone: freakonomics.com answered our HEAD request with 404 and our GET request with a 302 to the homepage. Browsers and Googlebot send GET.
Why Google treats these as soft 404s
Google's crawling errors documentation (last updated 2026-11-27) defines the problem: "A soft 404 error is when a URL that returns a page telling the user that the page does not exist and also a 200 (success) status code." It says such pages "are excluded from Search", and it names the homepage redirect directly: "Redirecting nonexistent URLs to an unrelated page (such as your home page) or creating fake placeholder content instead of returning a 404 or 410 status code can confuse users and search engines, and Google treats these as soft 404 errors."
The old Search Console Help article on 404 errors (support.google.com/webmasters/answer/2445990) now redirects to that page. Google's HTTP status codes page covers the other side: "Google doesn't index URLs that return a 4xx status code, and URLs that are already indexed and return a 4xx status code are removed from the index."
So a real 404 does exactly what you want: the dead URL leaves Google, and the visitor gets a helpful page. A soft 404 shows Google a page that claims to exist, and Search Console then reports it as a soft 404.
Why not redirect to the homepage?
The question has been asked for years. On UX Stack Exchange, What's the point of a 404 page? (2014) puts it plainly: "It would be very easy for me to (instead of showing a 404 page) redirect them back to the home page and display an error message". The top-voted answer: "A 404 tells the user the page he requested doesn't exist. This is useful information for the user." and "Displaying the homepage instead, with or without error, could confuse the user."
The same question for search: in the Google Search Central Community thread "What is Better for SEO to Redirect Non Existing URLs to Homepage or Create a 404 Page for them?" (May 2024, thread 273483916 on support.google.com), a reply reads "Absolutely should be left as 404", with a link to the community guide on the four types of 404.
And for WordPress: Wordpress redirect all 404 pages to the Homepage (24,641 views when we checked) asks "I want to redirect all 404 error pages on my WordPress site to the homepage, or to a specific page." The accepted answer gives a template_redirect snippet, but opens with its own warning: "Note: I have read somewhere that redirecting all 404 to Homepage is not a good approach for SEO purposes". The other answer says "Simply redirecting all 404's to the home page can be confusing to users, and hurt your SEO / search engine ranking" and suggests logging 404s with the Redirection plugin and redirecting the specific URLs that need it.
The data agrees with the answers. Of the 215 sites we checked, 190 return a real 404 and 4 redirect to the homepage. The rule that follows from Google's page: use a 301 redirect when a missing URL has a real replacement ("Only redirect when you have an equivalent replacement page"), and a 404 page for everything else.
What about redirecting after a few seconds?
A Webmasters Stack Exchange question, Redirect from 404 page to homepage after some seconds and SEO impact (2015), asks about a 404 page "with the error message and the correct status code" that sends the visitor home after a delay with "JavaScript or HTML refresh tag". The accepted answer says "It isn't necessarily bad for SEO", then: "this type of redirect can be particularly bad for users. In my research, these types of error pages that have some kind of automated redirect actually cause a considerably higher exit rate after people encounter the error." A second answer adds that "not everyone can read messages very quickly". None of the 190 real 404 pages in our check has a meta refresh tag. Put the links on the page and let the visitor choose.
404 page examples html
The file below is a complete custom 404 page in the same plain style as our HTML website example and the contact page examples template: the site header, a clear message, a search form, popular links, a home link, and a contact line. Save it as 404.html in the root of your site.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Page not found | Larkspur Café</title>
<meta name="robots" content="noindex" />
<style>
:root {
--ink: #1f2937;
--muted: #6b7280;
--accent: #b45309;
--paper: #fdfaf5;
--line: #e5e7eb;
}
* { box-sizing: border-box; }
body {
margin: 0;
font-family: Georgia, "Times New Roman", serif;
color: var(--ink);
background: var(--paper);
line-height: 1.6;
}
.container { max-width: 760px; margin: 0 auto; padding: 0 20px; }
header { background: #292524; color: #f5f5f4; }
.header-inner {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 10px;
padding: 14px 0;
}
.brand { font-size: 1.3rem; font-weight: bold; margin: 0; }
.brand a { color: inherit; text-decoration: none; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; }
nav a { color: #e7e5e4; text-decoration: none; }
nav a:hover, nav a:focus { color: #ffffff; text-decoration: underline; }
main { padding: 48px 0 64px; }
.code { color: var(--accent); font-size: 1rem; font-weight: bold; letter-spacing: 0.1em; margin: 0; }
h1 { font-size: 2rem; margin: 4px 0 8px; }
.lede { color: var(--muted); margin: 0 0 28px; }
form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 32px; }
label { width: 100%; font-weight: bold; }
input[type="search"] { flex: 1; padding: 10px 12px; font: inherit; border: 1px solid var(--line); border-radius: 4px; }
button { padding: 10px 16px; font: inherit; color: #ffffff; background: var(--accent); border: 0; border-radius: 4px; cursor: pointer; }
h2 { font-size: 1.1rem; margin: 0 0 8px; }
.popular { margin: 0 0 32px; padding-left: 20px; }
.popular li { margin: 4px 0; }
a { color: var(--accent); }
.home { display: inline-block; padding: 10px 18px; color: #ffffff; background: #292524; border-radius: 4px; text-decoration: none; }
footer { background: #292524; color: #a8a29e; text-align: center; padding: 16px 0; font-size: 0.9rem; }
</style>
</head>
<body>
<header>
<div class="container header-inner">
<p class="brand"><a href="/">Larkspur Café</a></p>
<nav aria-label="Main">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/menu.html">Menu</a></li>
<li><a href="/faq.html">FAQ</a></li>
<li><a href="/contact.html">Contact</a></li>
</ul>
</nav>
</div>
</header>
<main class="container">
<p class="code">404</p>
<h1>We can't find that page</h1>
<p class="lede">The link may be old, or the address may have a typo. The page you wanted may have moved, so try a search or one of the pages below.</p>
<form action="/search.html" method="get" role="search">
<label for="q">Search the site</label>
<input type="search" id="q" name="q" placeholder="Menu, hours, catering..." />
<button type="submit">Search</button>
</form>
<h2>Popular pages</h2>
<ul class="popular">
<li><a href="/menu.html">Menu and prices</a></li>
<li><a href="/faq.html#visiting">Opening hours and parking</a></li>
<li><a href="/faq.html#catering">Catering</a></li>
<li><a href="/contact.html">Directions and contact</a></li>
</ul>
<p><a class="home" href="/">Back to the homepage</a></p>
<p>Followed a broken link from our site? <a href="mailto:hello@larkspur.example?subject=Broken%20link">Tell us</a> and we will fix it. You can also call <a href="tel:+15550100000">(555) 010-0000</a>.</p>
</main>
<footer>
<div class="container">© 2026 Larkspur Café · 12 Eastside Avenue, Springfield · (555) 010-0000</div>
</footer>
</body>
</html>
Notes on the code:
- Every link starts with
/. The server shows this file at whatever address the visitor typed, such as/old/menu/2019/. A relative link likemenu.htmlwould then point to/old/menu/2019/menu.html, which is another 404. Root-relative links (/menu.html) work from any depth. The same goes for stylesheets and images, which is why the CSS here is inside the file. - No redirect and no timer. The page stays at the missing address and offers links.
- The search form sends
qto/search.html. Point it at your own search page, or delete the form if your site has none, as 7 of the 18 examples do. - The broken-link line is Smitten Kitchen's idea in plain HTML: a
mailto:link with a subject line. noindexis optional. A real 404 status already keeps the page out of Google. The tag is a backstop in case the page is ever served with200.- The file does not set the status code. The server does. The next section shows how.
How to make the server return a real 404
Our own site. This site is a static export served by a Cloudflare Worker (src/index.js). For each request, the Worker first applies the redirect and removal rules (removed pages get 410 Gone), adds the trailing slash to known pages, and then looks for a matching file: the exact path, the path plus index.html, or the path plus .html. When none exists, it fetches /404.html from the static files and returns its body with status: 404. If /404.html itself were missing, it would return a plain "Not found" with 404. The 404.html file is the build output of the site's not-found.tsx, which has "Back to home", "Search the site", and a row of popular sections. We checked it on 2026-12-03: /bwe-missing-page-check-20261203/ returns 404, and so does a missing URL inside a demo site such as /examples/restaurant/, which gets the same page.
Apache. Add one line to .htaccess or the server config, with a local path:
ErrorDocument 404 /404.html
Use a path, not a full URL. The Apache documentation warns that an ErrorDocument pointing to a remote URL makes the server "send a redirect to the client", and then "the client will not receive the original error status code, but instead will receive a redirect status code."
Nginx. In the server block:
error_page 404 /404.html;
This keeps the 404 status. The Nginx documentation also shows error_page 404 =200 /empty.gif;, where the =200 changes the response code. Leave the = part out for a 404 page.
Next.js (App Router). Put a not-found.tsx file in app/. On a server, Next.js returns 404 for it before streaming starts and 200 after, with a noindex tag in both cases (the cursor.com result above). With output: "export", Next.js writes the page to 404.html and your host decides the status code, as our Worker does.
Any host. Whatever the setup, test it with the commands in the checklist below. That is the only proof.
How to set a custom 404 page on Squarespace and WordPress
Squarespace (Creating a custom 404 page, last updated June 30, 2025):
- Create a new page and place it in the Not linked section of the Pages panel.
- Open the Pages panel, scroll to the bottom, click System Pages, then 404 Page.
- Use the drop-down menu to select your page. The default is "System Default", which links to the homepage and the search page.
Squarespace adds a warning that matches the Hammer & Hand result above: "If you build a custom 404 page, you might see a "Soft 404" alert when you verify your site with Google Search console." Its explanation: "Google flags these pages because they see a contradiction: an indexable page that says it doesn't exist." The fix it gives is to use the System default page or add a noindex tag to the custom page. Franklin Barbecue, a Squarespace site with a custom 404 message, returned a real 404 for our missing URL.
WordPress (classic themes): the theme's 404.php file is the 404 page. The template hierarchy says "404 template files are called in this order:" 404.php, then index.php. The 404 Pages handbook page starts with "create a file named 404.php and add it to your WordPress theme folder" and notes that "a great starting point for your 404.php is your index.php". SF-Marin Food Bank's page above uses the stock WordPress wording and returns 404. Skip the "redirect all 404s to the homepage" plugins and snippets for the reasons in the section above.
404 page checklist
- A clear message: 'Page not found' or a headline in your voice, then one plain sentence about what happened
- The normal site header, menu, and footer
- A link to the homepage
- A search box, if the site has search
- Three to ten links to the pages most visitors want
- A contact route: phone link, email, or a way to report the broken link
- Links, stylesheets, and images use root-relative paths (starting with /) so they work at any URL depth
- No automatic redirect and no countdown timer
- The server returns 404 (or 410 for pages you removed on purpose), never 200
- Missing URLs are not redirected to the homepage; 301 redirects only for pages with a real replacement
- Tested with GET, not only HEAD, and tested twice
- URL Inspection in Google Search Console shows the 404 status for a test URL
- Page indexing report checked for 'Soft 404' after launch
A noindex tag on the 404 page is optional. It is a backstop, not a substitute for the 404 status.
How to test your 404 page
Make up a URL on your site and request it with curl:
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/bwe-missing-page-check/
curl -sIL https://example.com/bwe-missing-page-check/
The first command makes a normal GET request, as a browser does, and prints the status code of that first response (a redirect shows up as 301 or 302). Pass is 404. The second prints every response in the redirect chain; a 301 or 302 followed by 200 means a redirect to another page, which is a soft 404. Run both, and run them twice: in our check, freakonomics.com answered HEAD with 404 and GET with a redirect to the homepage, and rogerlmartin.com gave 200 and then 404 for the same URL.
Then check the URL with the URL Inspection tool in Google Search Console, which Google's own documentation recommends "to verify whether your URL is actually returning the correct code". After launch, the Page indexing report lists any URLs Google has classed as soft 404. The website launch checklist includes this test with the other launch-day checks.
FAQ
Frequently asked questions
What is a 404 page?
Should a 404 page redirect to the homepage?
What is a soft 404?
Do 404 errors hurt SEO?
What is the difference between a 404 and a 410?
What should I put on a 404 page?
How do I check that my 404 page returns a 404 status?
Where to go next
Start with the server: make up a URL on your site, request it with curl, and fix the status code first if it is not 404. Then build the page from the HTML template and borrow specifics from the closest example: a call button from Dashing Maids, a booking box from Schweiger Dermatology, the broken-link report from Smitten Kitchen, the card grid from Stripe, or the task list from Feeding America. For the pages a 404 should point to, see the contact page examples and the FAQ page examples. The website structure examples help you pick the popular links, the HTML website example covers the rest of a hand-written site, and the website launch checklist puts the 404 test with the other launch-day checks. The full website examples library has more.