ArticleslgStudy

computer science

HTTP 404

HTTP 404 is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand HTTP 404 rather than just read about it. In short: In HTTP, the 404 HTTP status code indicates that a web client (i.e. browser) was able to communicate with a server, but the server could not provide the requested resource. The server may not have the resource or it may not wish to disclose whether it has the resource.

HTTP 404 — main illustration
HTTP 404 — illustration

Key takeaways

  • HTTP 404 belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect HTTP 404 to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of HTTP 404 from memory before moving on to harder problems.

Reference excerpt

In HTTP, the 404 HTTP status code indicates that a web client (i.e. browser) was able to communicate with a server, but the server could not provide the requested resource. The server may not have the resource or it may not wish to disclose whether it has the resource. The code is often associated with response reason Not Found and is often referred to as page not found or file not found. Often, the server generates a web page for the condition and the client displays it, and often the content indicates the error code. Since the condition is relatively commonly-encountered (i.e. due to broken or dead links), this code is one of the most recognizable on the World Wide Web.

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" 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.

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. 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. 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). 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. Other ISPs return a HTTP 403 "forbidden" error in the same circumstances. The practice of employing fake 404 errors as a means to conceal censorship has also been reported in Thailand and Tunisia. 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".

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

… excerpt ends here. Continue reading the full article.

Illustrations

HTTP 404: English Wikipedia's 404 page
English Wikipedia's 404 page
HTTP 404 illustration
HTTP 404: The Wikimedia 404 message
The Wikimedia 404 message

Worked examples

Example 1 — a first encounter with HTTP 404

Start with the simplest possible case. Write down what HTTP 404 claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to HTTP 404 before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about HTTP 404 ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of HTTP 404

In research
HTTP 404 appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses HTTP 404 in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
HTTP 404 is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer errors, Hypertext Transfer Protocol status codes, Internet terminology, so understanding it makes those chapters shorter.
In everyday life
Look for HTTP 404 outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “HTTP 404” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study HTTP 404 in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what HTTP 404 means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain HTTP 404 out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is HTTP 404 in simple terms?

In HTTP, the 404 HTTP status code indicates that a web client (i.e. browser) was able to communicate with a server, but the server could not provide the requested resource. The server may not have the resource or it may not wish to disclose whether it has the resource.

Why does HTTP 404 matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study HTTP 404?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on HTTP 404.

Tags

  • Computer errors
  • Hypertext Transfer Protocol status codes
  • Internet terminology

Keep exploring