418 I'm a teapot: The Famous April Fools' Joke
The Story Behind 418
On April 1, 1998, Larry Masinter and the HTTP Working Group published RFC 2324 as an April Fools' joke. The RFC defined the "Hyper Text Coffee Pot Control Protocol" (HTCPCP), a protocol for controlling coffee pots. The 418 status code was included to indicate that the server is a teapot and cannot brew coffee β a reference to the classic "Teapot" joke from the IETF.
Despite being a joke, 418 was officially registered by IANA and remains in the registry to this day. Many developers are aware of it, and some frameworks include it as a fun easter egg:
- Node.js (Express):
res.status(418).send('I\'m a teapot'); - Python (Flask):
return 'I\'m a teapot', 418 - Ruby on Rails:
render status: 418, plain: "I'm a teapot" - Spring Boot:
HttpStatus.I_AM_A_TEAPOT
What the RFC Says
From RFC 2324 (Section 2.3.2):
Yes, the RFC includes the "short and stout" pun from the nursery rhyme.
Is 418 a Real Status Code?
- Officially registered β yes, IANA lists it.
- Supported by frameworks β many HTTP libraries include it.
- Never used in production β you should not return 418 in a real application.
- Used for fun β sometimes included in APIs as an easter egg (e.g., returning 418 on April 1).
When to Use 418
- Never in production β it will confuse users and developers.
- For testing β it can be used as a fun way to check if your client handles unknown status codes.
- As an easter egg β on April 1st, some APIs return 418 for a laugh.
- For educational purposes β to demonstrate that HTTP has a sense of humor.
Fun Fact
Google's I/O conference in 2014 included a "Teapot" reference: a QR code on a teapot that returned a 418 status when scanned. Some Go libraries also include 418 as a known status code.
Frequently Asked Questions
Can I actually use 418 in my API?
Technically yes, but you shouldn't. It's a joke and will not be understood by most clients. Use it only for fun in nonβproduction environments.
Why is 418 still in the IANA registry?
Because it was officially registered and the IANA does not remove status codes. It remains as a historical curiosity and a reminder that the internet has a sense of humor.
Are there other April Fools' RFCs?
Yes! There are many, including RFC 2324 (HTCPCP), RFC 1149 (IP over Avian Carriers), and RFC 3514 (The Security Flag in the IPv4 Header). 418 is the most famous in the HTTP world.