Guides/Custom 404 Page Best Practices
Page SEO

Custom 404 Page Best Practices

You can't prevent every broken link. What you control is what happens on the page a visitor sees when one slips through — and most sites still ship the default dead end.

8 min read·By Vazagency·Updated July 2026

There are two separate problems hiding inside "404 errors," and it's worth being clear about which one this guide covers. One is prevention: finding and fixing broken internal links, setting up redirects for moved pages, cleaning up stale URLs after a site redesign — that's the audit-and-repair side, covered in finding and fixing broken links and 404 errors. The other problem is what this guide is about: no matter how disciplined you are about prevention, some 404s are unavoidable — an old backlink from a site you don't control, a bookmark to a page you retired years ago, a typo in a manually entered URL. The question this guide answers is what happens to that visitor when they land on the error page itself.

Most sites still answer that question with a bare, generic error page — a default template, a wall of technical text, maybe just the words "Page Not Found" with no way forward. That's a dead end at the exact moment a visitor needs a way out.

Get the status code right first

Before anything about design or copy, confirm the technical basics: the page should return an actual HTTP 404 (Not Found) status, or 410 (Gone) if content was deliberately and permanently removed. A surprisingly common mistake, especially on sites built with JavaScript frameworks or certain CMS setups, is a "soft 404" — a page that looks like an error page but actually returns a 200 OK status code to the server. That mismatch tells search engines the URL is a valid, real page, which can result in broken URLs getting indexed as legitimate content, or in real removed pages being treated inconsistently. This is invisible from the browser — you have to check server response headers or a tool that reports them to catch it.

Worth knowing

A custom 404 page can be styled however you want, but it still has to return a real 404 or 410 status under the hood. Design and status code are separate concerns — getting the design right doesn't fix a soft 404, and vice versa.

Keep it out of the index

A properly configured 404 status code generally keeps the page out of search results on its own, since search engines treat a 404 response as "this URL doesn't exist" rather than as content to index. It's still worth adding a noindex directive as a belt-and-suspenders measure, particularly if the 404 page is served from a single consistent template URL that could otherwise be crawled and treated ambiguously.

What actually belongs on the page

A clear, honest message — not a joke that gets in the way

A little personality is fine, but the primary job of the headline and message is clarity: tell the visitor plainly that the page they were looking for doesn't exist (or has moved), before anything cute. A page that leads with a pun or a joke image and buries the actual explanation below it makes visitors work harder to understand what happened, right when they're already slightly frustrated.

A search box

For any site with more than a handful of pages, a search box is one of the highest-value elements on a 404 page. It lets the visitor tell you directly what they were looking for, rather than forcing you to guess which of your navigation links might be the one they wanted. It becomes especially important as a site grows — more service pages, more locations, more blog posts — since the odds that a generic set of navigation links happens to include the exact page the visitor wanted go down as the site gets larger.

Links to the pages people are actually looking for

  • A link to the homepage — the safest, most universal recovery path.
  • Links to the main service or product categories, especially if the broken URL suggests what the visitor was after (a deleted service page, for example).
  • A link to the contact page, for anyone who'd rather just ask a person than keep hunting.
  • For a multi-location or multi-industry site, a link to the main services or locations index, so a visitor who followed a stale location-specific link isn't stuck.

Consistent site navigation and branding

The 404 page should still include the site's normal header and navigation, not a stripped-down page with nothing but an error message. A visitor landing here shouldn't feel like they've left the website — they should feel like they're still on it, just on a page that doesn't have what they were after, with an obvious way to get back on track.

What to leave off

  • Heavy promotional content. A visitor who just hit a dead end is not in the ideal frame of mind for a sales pitch — a small, secondary link to a relevant page is fine; a large discount banner is not.
  • Technical jargon. Raw error codes or stack-trace-style text belong in server logs, not in front of a visitor trying to find a service page.
  • A page that requires JavaScript to render anything useful. If the 404 page itself fails to render without JavaScript executing correctly, visitors on a flaky connection or older device can end up with an even more broken experience than the default server error.

If the broken URL maps cleanly to a real page, redirect instead

A well-designed 404 page is the right answer when there's genuine ambiguity about what the visitor wanted. But if you already know a broken URL corresponds to a specific real page — a service page that was renamed, a location page that moved — the better fix is a 301 redirect straight to the correct page, not a 404 page asking the visitor to find it themselves. Reserve the custom 404 experience for cases where no clean redirect target exists; see what is a 301 redirect, and when should you use one for that distinction, and the website migration SEO checklist for handling this at scale during a redesign.

A working checklist

  1. Confirm the page returns a real 404 or 410 HTTP status, not a 200.
  2. Add a noindex tag as a secondary safeguard.
  3. Write a clear, plain-language message explaining the page wasn't found.
  4. Include a working search box, especially on any site beyond a handful of pages.
  5. Link to the homepage, main service categories, and the contact page.
  6. Keep the normal site header and navigation intact.
  7. Skip heavy promotions and technical jargon.
  8. Redirect known-moved URLs instead of sending them to the 404 page at all.

Frequently asked questions

More guides

Want this handled for you?

We build the SEO foundation and handle the ongoing work — no long-term contract, no guaranteed-rankings sales pitch.