Search code examples
httphttp-status-code-404header

404 header - HTTP 1.0 or 1.1?


Why does almost every example I can find (including this question from about a year ago) say that a 404 header should be HTTP/1.0 404 Not Found when we've really been using HTTP 1.1 for over a decade? Is there any reason not to send HTTP/1.1 404 Not Found instead?

(Not that it matters all that much... I'm mostly just curious.)


Solution

  • The usage of HTTP version can be based on the following factors:

    • Your web server support for HTTP 1.0 or 1.1
    • The web browser's support for HTTP 1.0 or 1.1
    • Your preference as a web developer on which protocol version to use

    Modern browsers can support both 1.0 and 1.1 well, and both the client and server will settle for the highest version both can support together. The key differences between the 2 protocol can be found: http://www8.org/w8-papers/5c-protocols/key/key.html

    However there's no key differences in the usage of 404 Not Found. However do be consistent for your whole website. i.e. if you use HTTP/1.1, you use it throughout your website.