Skip to content

How to set up a proper 404 page

Best practices1 min readFixes check 404-page-custom

Missing pages should answer with status 404 and a helpful page, not a blank screen or a 200 that pretends to be fine.

Step by step, with screenshots: Custom 404 pages that help: status codes, content and the check →

Check your own site

Runs this check and the other 192, free, in about 45 seconds.

What it is

A 404 page is what your site shows when someone requests an address that does not exist, together with the HTTP status code 404 Not Found. A custom 404 page keeps your header and navigation and helps the visitor carry on, instead of showing a blank server error.

The status code matters as much as the design. If a missing page answers 200 OK, search engines treat it as a real page, a so-called soft 404, and keep dead URLs in their index. If it redirects every missing URL to the home page, Google treats that as a soft 404 too, and visitors lose the context of what they were looking for.

OK looks like this: unknown URLs return HTTP 404 (or 410 for pages removed for good) with a page that has your navigation, a short message, search and links to the main sections. getReport requests a random path and checks both the status and the page.

What a passing site looks like

  • Missing pages get a proper 404 pagewarning · −1 ptseffort S

Missing pages do not get a proper 404 page

Why it matters. A visitor on a broken link should see your own "page not found" with a menu and search, and search engines should get HTTP 404 so they drop the URL. A server default page or a 200 answer does neither.

How to fix it.
  1. Return HTTP 404 (not 200 or 302) for unknown URLs; a "soft 404" keeps dead pages in Google.
  2. Design the 404 page with your header, a short apology, search and links to the main sections; most CMSs have a 404 template.

Questions people ask

What is a soft 404?

A soft 404 is a page that tells visitors it is missing or empty but answers with a 200 OK status, or redirects to an unrelated page, so search engines see it as a real page. Google reports these in Search Console. Fix them by returning a real 404 or 410, or by redirecting to a genuinely matching page.

What is a 404 page?

A 404 page is the error page a web server returns when the requested URL does not exist, with the status code 404 Not Found. Every site has one; the default is often a plain server message. A custom 404 page replaces it with a helpful page in your own design.

Why is a 404 page important?

Because every site has broken links pointing at it, from typos, old campaigns and deleted pages. A helpful 404 page keeps those visitors on your site with navigation and search, and the correct 404 status tells search engines to drop the missing URL instead of indexing an error page.

What does 404 page not found mean?

It means the server was reached but has nothing at that address: the page was deleted, moved without a redirect, or the link has a typo. It is not a problem with the visitor's connection. Check the link, or use the site's search and navigation to find the content.

Does a custom 404 page help SEO?

Not directly, but getting 404s right does. Returning a real 404 status keeps dead URLs out of Google's index, and a helpful page keeps visitors who arrive on broken links from leaving. Redirect a missing URL only when a closely matching page exists.

Filed under Best practices. Copy is generated from the same catalogue that scores every report, so what you read here is what the report says.