My question is about multiple aspects of serving a 404, while this question is only about an url.

I see in the web multiple methods to serve a 404 in case a page becomes no longer working/found - but I'm confused about the right way.


There is a working page https://example.com/working-page.html, which suddenly becomes unfound.

Method 1

After becoming unfound, the page maintains its original URL, content and meta, but changes its status code from 200 to 404, which is visible only in the header, like this:

enter image description here

Method 2

The page which is now unfound, maintains its original url, but changes

  • status code, in the header from 200 to 404,

  • content and meta - from original to those specific for page 404, something like

    Page not found (404)

Method 3

The page which is now unfound, changes everthing:

Q: Which method would you consider as the best practice?

  • What exactly do you mean by "in case a page becomes no longer working/found"? Are you asking how to proactively remove a web page from your website, or how to react to something happening to your website? If the former, Method 1 seems non-sequitur to the question, since the page remains visible to users. Commented Apr 20, 2023 at 17:34
  • @MaximillianLaumeister I mean a case, where a page has an outdated content and no external backlinks, and needs to be deleted. In case of outdated content and existing backlinks I redirect such page - but page without any equity should be removed.
    – Evgeniy
    Commented May 4, 2023 at 9:53

1 Answer 1


Best practice is method 2: Your URL stays the same but users get a message saying that the content can't be found.

If you can configure your server to know that there was once content on that URL but it is now purposefully removed, it is even better to use a "410 Gone" HTTP status and corresponding error message.

Method 1 is not a good practice because the content is still available to users. That makes little sense. The server finds the content and serves it, but says that it can't find it? You risk that search engines stop trusting your status headers when they see content with a 404 error. Users might still link to this "unavailable" content.

Method 3 is commonly used but it isn't great user experience. When you redirect away from a URL to show a 404 error, users can't easily figure out what URL wasn't found. Search engines treat redirects to 404 pages pretty much the same as 404 errors, so from an SEO standpoint it is fine. This method is commonly used with client side routing because it is impossible to change the status of the current URL with JavaScript. The best you can do is change the URL to one with the desired status.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.