Aller au contenu principal

Guides / http-status-codes

404 Not Found: Broken Links, Soft 404s and When to Use 410

A 404 Not Found means the server has no current representation for that URL, and it says nothing about whether the resource ever existed or will come back. That ambiguity is the point: a 404 can be a broken link you should fix, a page you removed on purpose, or a page that works perfectly and only pretends to be missing.

What a 404 does and does not tell you

Under RFC 9110, a 404 means the origin server did not find a current representation for the target resource, or is not willing to disclose that one exists. Two details follow from that wording.

First, a 404 is deliberately non-committal about permanence. It does not promise the URL will stay dead, which is why crawlers keep retrying 404 URLs for a long time. Second, 404 is cacheable by default under RFC 9111, so a caching proxy or CDN can store the error and keep serving it after you have fixed the underlying problem. Always purge the cache after a 404 fix and re-test.

A 404 is also a normal, healthy response. Every site returns some. The ones worth your time are on URLs that should work, or on URLs people are trying to reach.

These two cases look identical in a status code and need opposite responses.

A broken link means the content exists but the URL is wrong. The usual causes are a typo in an internal link, a slug edited after publication, a case-sensitivity mismatch, a trailing slash difference, a site migration that changed the URL scheme, or a deploy that stopped emitting a file. The fix is to restore the URL or redirect it.

A genuine removal means the content is gone and is not coming back: an expired job listing, a discontinued product, a deleted account page. Here a 404 is honest but lazy, because it leaves crawlers retrying and visitors with nothing.

Practical way to tell them apart: does an equivalent page exist somewhere on the site today? If yes, redirect. If no, decide between 404 and 410.

410 Gone, the honest alternative

410 says the resource was available and has been intentionally removed, and the condition is expected to be permanent. Where 404 means "not found", 410 means "deleted on purpose, stop asking".

Use 410 when you deliberately retire content and have no replacement. It is the correct signal for expired listings, sunset product pages and content removed for legal or editorial reasons. Search engines generally treat 410 as a stronger, faster removal signal than 404, though both eventually drop the URL. Like 404, 410 is cacheable by default.

Do not use 410 for anything you might restore, and do not use it as a blanket handler for unknown URLs. If a suitable replacement page exists, a redirect is better than either code, and the choice of redirect matters: see 301 vs 302 for picking the right one.

Soft 404s and why monitors miss them

A soft 404 is a page that returns 200 OK while its content says the resource is missing. It happens when an application catches its own not-found condition and renders a friendly "page not found" template without setting the status code, or when a catch-all route serves the homepage for every unmatched URL.

Search engines and uptime monitors then read the same page in opposite ways. Google inspects the rendered content, recognizes the missing-content pattern and classifies it as a soft 404 in Search Console, so the URL is not indexed but crawl budget is still spent on it and the signal is muddied. A monitor that compares status codes sees 200 and reports the page as healthy, which is how an entire section can serve "not found" text to every visitor while the dashboard stays green.

The fix on the site is to return a real 404 with the error page, which costs nothing and satisfies both readers. The fix in monitoring is to assert on content as well as status: check that a known phrase from the real page is present, so a page that returns 200 with the wrong body still fails the check.

How to fix 404s in the right order

  1. Confirm the actual code, not the visible page. A friendly error screen proves nothing:
    curl -sS -o /dev/null -w "%{http_code}\n" https://example.com/missing-page
    If that prints 200 for a page that reads "not found", you have a soft 404.
  2. Find which URLs are being hit. Server access logs and Search Console both list 404 URLs with volume. Fix by traffic, not alphabetically.
  3. Fix internal links first. A 404 reached from your own navigation is entirely within your control and is the highest-value fix.
  4. Redirect where a real equivalent exists. Map the old URL to the closest current page, one URL at a time. Avoid redirecting everything to the homepage, which search engines also treat as a soft 404.
  5. Return 410 for deliberate removals with no replacement, so crawlers stop retrying.
  6. Make the 404 page useful. Search, main navigation and popular links recover visitors that a bare error page loses.
  7. Purge caches and re-test. Because 404 is cacheable, verify the fixed URL from outside your network, not just from the origin.

Checking the code and the content together

A slug edit, a plugin update or a routing change breaks a set of URLs while the homepage keeps loading, so nothing alerts and nobody notices until traffic or conversions drop. A scheduled HTTP check on your important URLs compares both the status code and the expected page content, which catches a real 404 and a soft 404 alike. For the wider family of client-side codes, and for telling a genuine client mistake from a server misconfiguration, see the 4xx overview.

Check it now

Run the free check against your own site - no account needed.

HTTP check

Monitor this permanently

Get alerted the moment it breaks: HostTracker checks from 300+ locations and notifies you by email, SMS, Slack, Telegram and more.

HostTracker features