HTTP 404

From HandWiki
Short description: Internet error message

In computer network communications, the HTTP 404, 404 not found, 404, 404 error, page not found, or file not found error message is a hypertext transfer protocol (HTTP) standard response code, to indicate that the browser was able to communicate with a given server, but the server could not find what was requested. The error may also be used when a server does not wish to disclose whether it has the requested information.[1]

The website hosting server will typically generate a "404 Not Found" web page when a user attempts to follow a broken or dead link; hence the 404 error is one of the most recognizable errors encountered on the World Wide Web.

English Wikipedia's 404 Page

Overview

When communicating via HTTP, a server is required to respond to a request, such as a web browser request for a web page, with a numeric response code and an optional, mandatory, or disallowed (based upon the status code) message. In code 404, the first digit indicates a client error, such as a mistyped Uniform Resource Locator (URL). The following two digits indicate the specific error encountered. HTTP's use of three-digit codes is similar to the use of such codes in earlier protocols such as FTP and NNTP. At the HTTP level, a 404 response code is followed by a human-readable "reason phrase". The HTTP specification suggests the phrase "Not Found"[1] and many web servers by default issue an HTML page that includes both the 404 code and the "Not Found" phrase.

A 404 error is often returned when pages have been moved or deleted. In the first case, it is better to employ URL mapping or URL redirection by returning a 301 Moved Permanently response, which can be configured in most server configuration files, or through URL rewriting; in the second case, a 410 Gone should be returned. Because these two options require special server configuration, most websites do not make use of them.

404 errors should not be confused with DNS errors, which appear when the given URL refers to a server name that does not exist. A 404 error indicates that the server itself was found, but that the server was not able to retrieve the requested page.

History

The origin of the 404 error code dates back to the early days of the World Wide Web. In 1992, Tim Berners-Lee, the inventor of the Web, and his team at CERN, the European Organization for Nuclear Research, created the first web server software, called CERN httpd.[2] This software used a simple file system to store and retrieve web pages, and it assigned a three-digit number to each type of request and response. The number 404 was chosen to indicate that the requested file was not found on the server.[3]

The term "404 Not Found" was coined by Berners-Lee himself, who explained in a 1998 interview that he wanted to make the error message "slightly apologetic".[4][3] He also said that he considered using "400 Bad Request" instead, but decided that it was too vague and technical.[4][3]

The first documented case of a 404 error appearing on a web page was in 1993, when a user tried to access a page about the Mosaic web browser on the NCSA website. The page had been moved to a different location, but the link had not been updated.[2] The user reported the error to the NCSA team, who fixed the link and added a humorous message to their 404 page: "We're sorry, but the document you requested is not here. Maybe you should try someplace else."[3]

Since then, 404 errors have become one of the most common and recognizable errors on the Web. Many websites have customized their 404 pages with creative designs, messages, or features to entertain or assist their visitors. For example, Google's 404 page features a broken robot and a link to its homepage,[5] while GitHub's 404 page shows a random image of a parallax star field and a link to its status page.[6] Some websites have also used their 404 pages to showcase their brand personality, humor, or social causes. For instance, Lego's 404 page shows the Lego minifigure Emmet along with a humorous message,[7] Amazon's displays the image of a dog,[8] Peugeot's shows a picture of its 404 model, [9] and RTÉ's shows an image of Bosco.[10][11]

Soft 404 errors

Some websites report a "not found" error by returning a standard web page with a "200 OK" response code, falsely reporting that the page loaded properly; this is known as a soft 404. The term "soft 404" was introduced in 2004 by Ziv Bar-Yossef et al.[12]

Soft 404s are problematic for automated methods of discovering whether a link is broken. Some search engines, like Yahoo and Google, use automated processes to detect soft 404s.[13] Soft 404s can occur as a result of configuration errors when using certain HTTP server software, for example with the Apache software, when an Error Document 404 (specified in a .htaccess file) is specified as an absolute path (e.g. http://example.com/error.html) rather than a relative path (/error.html).[14] This can also be done on purpose to force some browsers (like Internet Explorer) to display a customized 404 error message rather than replacing what is served with a browser-specific "friendly" error message (in Internet Explorer, this behavior is triggered when a 404 is served and the received HTML is shorter than a certain length, and can be manually disabled by the user).

There are also "soft 3XX" errors where content is returned with a status 200 but comes from a redirected page, such as when missing pages are redirected to the domain root/home page.

Proxy servers

Some proxy servers generate a 404 error when a 500-range error code would be more correct. If the proxy server is unable to satisfy a request for a page because of a problem with the remote host (such as hostname resolution failures or refused TCP connections), this should be described as a 5xx Internal Server Error, but might deliver a 404 instead. This can confuse programs that expect and act on specific responses, as they can no longer easily distinguish between an absent web server and a missing web page on a web server that is present.

Intentional 404s

In July 2004, the UK telecom provider BT Group deployed the Cleanfeed content blocking system, which returns a 404 error to any request for content identified as potentially illegal by the Internet Watch Foundation.[15] Other ISPs return a HTTP 403 "forbidden" error in the same circumstances.[16] The practice of employing fake 404 errors as a means to conceal censorship has also been reported in Thailand[17] and Tunisia.[18] In Tunisia, where censorship was severe before the 2011 revolution, people became aware of the nature of the fake 404 errors and created an imaginary character named "Ammar 404" who represents "the invisible censor".[19]

Microsoft Internet Server 404 substatus error codes

The webserver software developed by Microsoft, Microsoft's Internet Information Services (IIS), returns a set of substatus codes with its 404 responses. The substatus codes take the form of decimal numbers appended to the 404 status code. The substatus codes are not officially recognized by IANA and are not returned by non-Microsoft servers.

Substatus codes

Microsoft's IIS 7.0, IIS 7.5, and IIS 8.0 servers define the following HTTP substatus codes to indicate a more specific cause of a 404 error:

  • 404.0 – Not found.
  • 404.1 – Site Not Found.
  • 404.2 – ISAPI or CGI restriction.
  • 404.3 – MIME type restriction.
  • 404.4 – No handler configured.
  • 404.5 – Denied by request filtering configuration.
  • 404.6 – Verb denied.
  • 404.7 – File extension denied.
  • 404.8 – Hidden namespace.
  • 404.9 – File attribute hidden.
  • 404.10 – Request header too long.
  • 404.11 – Request contains double escape sequence.
  • 404.12 – Request contains high-bit characters.
  • 404.13 – Content length too large.
  • 404.14 – Request URL too long.
  • 404.15 – Query string too long.
  • 404.16 – DAV request sent to the static file handler.
  • 404.17 – Dynamic content mapped to the static file handler via a wildcard MIME mapping.
  • 404.18 – Query string sequence denied.
  • 404.19 – Denied by filtering rule.
  • 404.20 – Too Many URL Segments.

Custom error pages

The Wikimedia 404 message

Web servers can typically be configured to display a customised 404 error page, including a more natural description, the parent site's branding, and sometimes a site map, a search form or 404-page widget. The protocol level phrase, which is hidden from the user, is rarely customized. Internet Explorer, however, will not display custom pages unless they are larger than 512 bytes, opting instead to display a "friendly" error page.[20] Google Chrome included similar functionality, where the 404 is replaced with alternative suggestions generated by Google algorithms, if the page is under 512 bytes in size.[21] Another problem is that if the page does not provide a favicon, and a separate custom 404-page exists, extra traffic and longer loading times will be generated on every page view.[22][23]

Many organizations use 404 error pages as an opportunity to inject humor into what may otherwise be a serious website. For example, Metro UK shows a polar bear on a skateboard, and the web development agency Left Logic has a simple drawing program.[24] During the 2015 UK general election campaign the main political parties all used their 404 pages to either take aim at political opponents or show relevant policies to potential supporters.[25] In Europe, the NotFound project, created by multiple European organizations including Missing Children Europe and Child Focus, encourages site operators to add a snippet of code to serve customized 404 error pages[26] which provide data about missing children.[27]

While many websites send additional information in a 404 error message—such as a link to the homepage of a website or a search box—some also endeavor to find the correct web page the user wanted. Extensions are available for some content management systems (CMSs) to do this.[28]

Tracking 404 errors

A number of tools exist that crawl through a website to find pages that return 404 status codes. These tools can be helpful in finding links that exist within a particular website. The limitation of these tools is that they only find links within one particular website, and ignore 404s resulting from links on other websites. As a result, these tools miss out on 83% of the 404s on websites.[29] One way around this is to find 404 errors by analyzing external links.[30]

One of the most effective ways to discover 404 errors is by using Google Search Console, Google Analytics or crawling software.

Another common method is tracking traffic to 404 pages using log file analysis.[31] This can be useful to understand more about what 404s users reached on the site. Another method of tracking traffic to 404 pages is using JavaScript-based traffic tracking tools.[32]

Causes

There are many possible causes for a page not to exist. Some of the common ones are:[33][34][35]

  • The page was deleted by the owner or administrator of the website.
  • The page was moved to a different location or renamed without updating the links that point to it.
  • The page was never created in the first place or is still under construction.
  • The page is temporarily unavailable due to maintenance or technical issues.
  • The page is blocked by the user's network or firewall settings.
  • The page is restricted by the website's privacy or security policies.
  • The page contains illegal or harmful content that was removed by the authorities or the website itself.

Solutions

If a user encounters a page that doesn't exist, there are some steps they can take to try to find the information they are looking for or to report the problem.[33][34][35]

  • Check the URL of the page. Sometimes, a simple typo or spelling mistake can cause a page not to load. Make sure the correct address is entered and try again.
  • Refresh the page. Sometimes, a temporary glitch or network issue can prevent a page from loading. Try reloading the page by pressing F5 or clicking on the refresh button on the browser.
  • Go back to the previous page. Sometimes, a link might be broken or outdated. Try going back to the page where the link was found and see if there is an updated or alternative link to the same information.
  • Use a search engine. Sometimes, a page might be indexed by a search engine even if it doesn't exist anymore. Try searching for keywords related to the topic of the page and see if other sources of information can be found.
  • Contact the website owner or administrator. Sometimes, a page might be removed or moved without notice. Try contacting the person or organization responsible for the website and ask them about the status of the page. Their contact information can usually be found on their homepage or in their footer section.
  • Report the error. Sometimes, a page might not exist due to an error on the website's part. Try reporting the error to the website owner or administrator so they can fix it as soon as possible. Their feedback form or email address can usually be found on their homepage or in their footer section.

See also

References

  1. 1.0 1.1 Fielding, R.; Reschke, J. (June 2014). RFC 7231, HTTP/1.1 Semantics and Content, Section 6.5.4 404 Not Found. ietf.org. doi:10.17487/RFC7231. http://tools.ietf.org/html/rfc7231#section-6.5.4. Retrieved 2018-12-13. 
  2. 2.0 2.1 "404 page design: best practices and awesome examples". https://www.justinmind.com/blog/best-404-pages/. 
  3. 3.0 3.1 3.2 3.3 "What is a 404 error and what should I do if I get one? » Internet » Windows » Tech Ease" (in en-US). https://etc.usf.edu/techease/win/internet/what-is-a-404-error-and-what-should-i-do-if-i-get-one/. 
  4. 4.0 4.1 (in en) What is the world wide web? – Twila Camp, https://www.youtube.com/watch?v=J8hzJxb0rpc, retrieved 2023-05-19 
  5. "Google 404 Error Page". http://google.com/404. 
  6. "Github 404 Error Page". https://github.com/404. 
  7. "LEGO 404 Error Page". https://www.lego.com/en-in/404. 
  8. "Amazon's 404 error page". https://www.amazon.com/404. 
  9. "Peugeot's 404 error page". https://www.peugeot.com/404. 
  10. Neylon, Michele (2011-08-07). "RTE's 404 Keeps Bosco Alive" (in en-GB). https://michele.blog/rtes-404-keeps-bosco-alive/. 
  11. "404 Page not found". https://www.rte.ie/404. 
  12. Ziv Bar-Yossef; Andrei Z. Broder; Ravi Kumar; Andrew Tompkins (2004). "Sic transit gloria telae". Proceedings of the 13th international conference on World Wide Web. pp. 328–337. doi:10.1145/988672.988716. ISBN 978-1581138443. 
  13. "Why is your crawler asking for strange URLs that have never existed on my site?". Yahoo Ysearch Help page. http://help.yahoo.com/l/nl/yahoo/ysearch/slurp/slurp-10.html. 
  14. "Farewell to soft 404s". Google Official Blog. http://googlewebmastercentral.blogspot.com/2008/08/farewell-to-soft-404s.html. 
  15. "LINX Public Affairs » Cleanfeed: the facts". Publicaffairs.linx.net. 10 September 2004. https://publicaffairs.linx.net/news/?p=154. 
  16. "DEMON – Error 403". https://airbrake.io/blog/http-errors/403-forbidden-error. 
  17. Sambandaraksa, Don (18 February 2009). "The old fake '404 Not Found' routine - Dead link". Bangkok Post. http://www.bangkokpost.com/tech/technews/11872/the-old-fake-404-not-found-routine. 
  18. Noman, Helmi (12 September 2008). "Tunisian journalist sues government agency for blocking Facebook, claims damage for the use of 404 error message instead of 403". Open Net Initiative. http://opennet.net/node/950. 
  19. "Anti-censorship movement in Tunisia: creativity, courage and hope!". Global Voices Advocacy. 27 May 2010. http://advocacy.globalvoicesonline.org/2010/05/27/anti-censorship-movement-in-tunisia-creativity-courage-and-hope/. 
  20. "Friendly HTTP Error Pages". msdn.com. 18 August 2010. http://blogs.msdn.com/b/ieinternals/archive/2010/08/19/http-error-pages-in-internet-explorer.aspx. 
  21. "Issue 1695: Chrome needs option to turn off "Friendly 404" displays". https://bugs.chromium.org/p/chromium/issues/detail?id=1695. 
  22. Heng, Christopher (7 September 2008). "What is Favicon.ico and How to Create a Favicon Icon for Your Website". http://www.thesitewizard.com/archive/favicon.shtml. 
  23. "The Dastardly "favicon.ico not found" Error". Internet Folks. 3 August 1999. http://internetfolks.com/dastardly-favicon-ico-found-error/. 
  24. "From skateboarding bears to missing children: The power of the 404 Not Found error page". Metro. 6 June 2011. http://metro.co.uk/2013/04/16/from-skateboarding-bears-to-missing-children-the-power-of-the-404-not-found-error-page-3591031/. 
  25. "The political Page 404 war". 27 April 2015. http://www.bbc.co.uk/newsbeat/article/32480181/the-political-page-404-war. 
  26. "Notfound.org". http://notfound.org/notfound. 
  27. "Missing children messages go on 404 error pages". BBC News. 27 September 2012. https://www.bbc.com/news/technology-19741350. 
  28. Swenson, Sahala (19 August 2008). "Make your 404 pages more useful". Official Google Webmaster Central Blog. Google, Inc. http://googlewebmastercentral.blogspot.com/2008/08/make-your-404-pages-more-useful.html. 
  29. "Sources Leading To 404s". SpringTrax. https://springtrax.com/key-stats-about-404-errors/default.htm#/section4. 
  30. Cushing, Anne (2 April 2013). "A Data-Centric Approach To Identifying 404 Pages Worth Saving". Search Engine Land. http://searchengineland.com/a-data-centric-approach-to-identifying-404-pages-worth-saving-152844. 
  31. "Tracking and Preventing 404 Errors". 404errorpages.com. http://www.404errorpages.com/#tracking. 
  32. "Understand 404 Errors". SpringTrax.com. https://springtrax.com/how-springtrax-helps/understand-your-websites-404-errors.htm. 
  33. 33.0 33.1 Edgar, Matthew (2023-04-11). "How To Fix 404 Errors On Your Website" (in en-US). https://www.matthewedgar.net/find-and-fix-404-errors/. 
  34. 34.0 34.1 Frickey, Dean (2008-11-18). "A More Useful 404" (in en-US). https://alistapart.com/article/amoreuseful404/. 
  35. 35.0 35.1 "What 'Error 404' means and how to fix it" (in en-US). 2023-01-31. https://www.ionos.com/digitalguide/websites/website-creation/what-does-the-404-not-found-error-mean/. 

External links