SEO

The 404 page: how to create and optimise it

Every website that has been around for a while collects addresses that no longer exist: deleted products, renamed pages, links from other sites with a typo in the URL. Anyone who lands on one of those addresses sees a 404 page.

A 404 in itself is nothing to be embarrassed about. What matters is what happens next: does the visitor find their way to your content, or close the tab?

What a 404 is and whether it hurts SEO

404 is the HTTP status code a server uses to say: there is nothing at this address. It is a perfectly normal response, and Google has said itself that 404 errors do not lower the rankings of the rest of your site. A URL that doesn't exist simply drops out of the index over time.

The real costs come from elsewhere:

  • Broken internal links. When your own page links to a missing address, crawlers waste time on it and visitors hit a dead end.
  • Lost backlinks. When another site linked to a page that now returns 404, the value of that link is lost. For a small site, backlinks are exactly the thing that is hardest to earn.
  • Visitors who leave. Someone arriving from search or an ad who is met with a bare error message will not start exploring your menu.

Decide URL by URL

Before you spend time on the design of your 404 page, look at what happened to those addresses. Each one has one of three answers.

The page moved → 301. If the content still exists at a new address, send the old URL to the exact equivalent page with a permanent (301) redirect. That way both the visitor and most of the link value arrive where they should. For a deleted product, its category page can also be a sensible destination — if it is a genuine next step for the visitor.

The page was removed and has no replacement → 404 or 410. Status 410 ("Gone") says the page was removed on purpose and is not coming back. Google usually drops such URLs from the index a little faster. In practice the difference is small — both are correct.

Don't redirect everything to the homepage. This is the most common mistake: during a redesign, a single rule sends every missing URL to the homepage. Google recognises the pattern and treats it as a soft 404 — the redirect passes nothing on, and the visitor is confused because they were looking for something specific and landed on a general page. A redirect only makes sense when the target genuinely answers the same question.

Soft 404: the page says "not found", the server says "all fine"

A soft 404 can arise another way too: the page says "page not found", but the server responds with 200 (OK). The crawler then sees an ordinary, indexable page — and every mistyped URL becomes a potential duplicate. Google can give the same label to very thin pages as well, such as empty search results or product pages with no content.

There are two simple ways to check:

  • Open a nonexistent address in your browser (e.g. /this-page-does-not-exist/) and look at the status code of the first request in the Network tab of the developer tools.
  • From the command line: curl -I https://your-domain.com/this-page-does-not-exist/ — the first line should say 404, not 200 or 301.

Typical culprits are single-page JavaScript apps that draw the error message in the browser after the server has already answered 200, and CMS plugins that "rescue" every error by sending it to the homepage.

What a good 404 page contains

The 404 page is the only page a visitor always opens disappointed. Its job is to fix that disappointment in one click.

  • A clear message in plain language. "We couldn't find this page — it may have moved, or there may be a typo in the address." No technical jargon, and no blaming the visitor.
  • The site's normal header, navigation and design. The visitor needs to see that they are still on the right site. A bare server error page says the opposite.
  • Links onward. Main sections, the most popular pages, services or product categories — whatever most visitors are looking for.
  • Search, if the site has it.
  • A way to get in touch. If someone was looking for something specific, an email address or phone number beats a dead end.
  • Lightweight. A 404 page needs no large images or animations. It should load quickly even when a crawler requests hundreds of them in a row.
  • The right language on a multilingual site. If the URL starts with /en/, the error message should be in English too.

And two things to avoid:

  • Automatically redirecting to the homepage after a few seconds. The visitor has no time to read what happened, and Google may treat it as a soft 404.
  • You don't need a noindex tag. The 404 status already keeps the page out of the index. The extra tag does no harm, but it adds nothing either.

How to find your 404s

Google Search Console. Under Indexing → Pages, look for the reason Not found (404). These are the addresses Google's crawler has tried to fetch. The list includes old and random URLs too, so don't be alarmed by its length.

A crawler. A tool that goes through your site the way a search engine does and finds broken internal links — along with the page each link sits on. For internal links, it is the fastest method.

Server logs. They show every request, including the ones Google doesn't report: old bookmarks, links in emails, ad landing URLs.

If you want to review the whole site yourself, the steps are in website audit: what to check and in what order. Checking for broken links is also on the list in 25 actions that improve your website's SEO.

What to fix first

  1. Broken internal links. They are entirely under your control and easy to fix: correct the link.
  2. URLs with backlinks or traffic. Give them a 301 to the closest equivalent page. Search Console shows links (the Links report), your analytics shows traffic.
  3. The rest can stay 404. That is the correct answer, and Google will visit them less and less often over time.

Old junk is a separate matter. After moving off WordPress, addresses like /tag/…, /author/…, /feed/ or ?p=123 get left behind. You don't need to go through them one by one: they can safely return 404, or you can handle them with pattern-based rules — for example, old category URLs to the matching new category page. More on what to check when leaving WordPress: migrating from WordPress to a modern site.

After a redesign, 404s arrive in an avalanche

Most 404s appear on a single day: when the new site goes live and the URL structure changes. If the map of old and new addresses isn't finished before launch, the site loses rankings that took years to build. How to avoid that is covered separately: website redesign without losing SEO.

For the first couple of weeks after launch, check the 404 list every few days.

When to get help

On a small site you can do all of the above yourself. It gets harder when there are hundreds of 404s, when redirect rules start to conflict or form chains, or when it isn't clear whether the server really returns the right status code. That kind of check is part of website maintenance. If a new site is on the way, redirects and the 404 page belong in website development from the very start.

Keep reading

Related services

Ready to take your business to the next level?

Get in touch today and let's build something remarkable.

Get in touch