📜 Reading: RFC Specifications
3 exercises — read real RFC text from HTTP and networking standards. Practice understanding the precise language of technical specifications, requirement levels, and status codes.
RFC reading essentials
- MUST → mandatory, no exceptions allowed
- SHOULD → strongly recommended, but deviations allowed with justification
- MAY → truly optional, no preference
- i.e. → "that is" (clarification) — e.g. → "for example" (instance)
- RFCs are the authoritative source — when in doubt, read the RFC
0 / 3 completed
1 / 3
RFC 7231 — HTTP 404 Not Found
RFC 7231 — Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
Section 6.5.4. 404 Not Found
The 404 (Not Found) status code indicates that the origin server did
not find a current representation for the target resource or is not
willing to disclose that one exists. A 404 status code does not
indicate whether this lack of representation is temporary or
permanent; the 410 (Gone) status code is preferred over 404 if the
origin server knows, presumably through some configurable means, that
the condition is likely to be permanent.
A server that wishes to make public that some of its resources are
permanently unavailable, and for which it has no forwarding address,
SHOULD respond with the 410 (Gone) status code.
A 404 response is cacheable by default; i.e., unless otherwise
indicated by the method definition or explicit cache controls (see
Section 4.2.2 of [RFC7234]). According to this RFC section, when SHOULD a server use 410 (Gone) instead of 404 (Not Found)?
When the server knows the condition is likely permanent:
The RFC states: "the 410 (Gone) status code is preferred over 404 if the origin server knows, presumably through some configurable means, that the condition is likely to be permanent."
Key distinction:
Search engine crawlers treat 410 differently from 404. A 410 tells Google to immediately deindex the URL, while 404 may be retried.
RFC language: SHOULD vs. MUST:
This RFC uses "SHOULD" (not "MUST") for preferring 410 over 404. This means it's recommended but not required — there are valid reasons to use 404 for a permanently missing resource (e.g., you simply don't know if it's permanent).
Reading RFCs: The language is extremely precise. Every word like "indicates", "preferred", "SHOULD", "MUST" has a specific technical meaning defined by RFC 2119.
The RFC states: "the 410 (Gone) status code is preferred over 404 if the origin server knows, presumably through some configurable means, that the condition is likely to be permanent."
Key distinction:
- 404 Not Found → resource doesn't exist right now, or server won't say. It does NOT tell the client whether the absence is temporary or permanent.
- 410 Gone → server explicitly communicates: "this was here, it's permanently gone, stop asking"
Search engine crawlers treat 410 differently from 404. A 410 tells Google to immediately deindex the URL, while 404 may be retried.
RFC language: SHOULD vs. MUST:
This RFC uses "SHOULD" (not "MUST") for preferring 410 over 404. This means it's recommended but not required — there are valid reasons to use 404 for a permanently missing resource (e.g., you simply don't know if it's permanent).
Reading RFCs: The language is extremely precise. Every word like "indicates", "preferred", "SHOULD", "MUST" has a specific technical meaning defined by RFC 2119.
Next up: YAML & JSON Configs →