418

I'm a Teapot

The server refuses to brew coffee because it is, permanently, a teapot.

Quick Definition

Any attempt to brew coffee with a teapot should result in the error code 418. This status code was defined in RFC 2324, the Hyper Text Coffee Pot Control Protocol (HTCPCP), published as an April Fools' joke on April 1, 1998. Despite being a joke, it has become one of the most beloved Easter eggs in web development.

The Origin Story

RFC 2324 was published on April 1, 1998 by Larry Masinter. It defines HTCPCP - a protocol for controlling, monitoring, and diagnosing coffee pots. The spec introduced the BREW HTTP method and the 418 status code, which a teapot returns when asked to brew coffee. The RFC was updated in 2014 by RFC 7168, which extended HTCPCP to handle tea.

In 2017, chairman of the HTTP Working Group Mark Nottingham proposed removing 418 from Node.js, Go, and other implementations. The developer community rallied behind the "Save 418" movement, and the code was preserved. Google even has a fun Easter egg at google.com/teapot.

Where You Might See It

  • Developer Easter eggs - Some APIs return 418 on hidden or joke endpoints as a fun surprise
  • Google's teapot page - Visit google.com/teapot to see Google's implementation with an animated teapot
  • Web framework test responses - Used in unit tests and demo applications to verify custom status code handling
  • Bot/scraper deterrent - Some websites return 418 to known scrapers or suspicious automated requests
  • API rate limiting humor - Occasionally used instead of 429 as a lighthearted rate limit response
  • Placeholder during development - Developers sometimes use 418 to mark unimplemented endpoints during API development

Framework Support:

Node.js Natively supported. res.status(418).send("I'm a teapot") works out of the box in Express.

Python Django and Flask both support HttpResponse(status=418). Python's http.client includes it in status codes.

Go Defined as http.StatusTeapot in Go's standard library net/http package.

ASP.NET Available as StatusCodes.Status418ImATeapot since .NET Core.

💻 HTTP Example

# Attempting to brew coffee with a teapot (per HTCPCP)
BREW /coffee HTTP/1.1
Host: teapot.example.com
Content-Type: application/coffee-pot-command
Accept-Additions: cream

# Teapot Response
HTTP/1.1 418 I'm a Teapot
Content-Type: text/html

<html>
  <body>
    <h1>418 - I'm a Teapot</h1>
    <p>I can't brew coffee. I'm a teapot.</p>
    <p>This error is defined by RFC 2324.</p>
  </body>
</html>

Frequently Asked Questions

Is 418 I'm a Teapot a real HTTP status code? +
Yes and no. HTTP 418 was defined in RFC 2324 (Hyper Text Coffee Pot Control Protocol), published as an April Fools' joke on April 1, 1998. It's not part of the official HTTP standard (RFC 7231/9110), but it has been implemented in virtually every major web framework and programming language. In 2017, there was a proposal to remove it, but the developer community rallied to save it, and it remains widely supported and recognized.
Should I use 418 in production? +
Generally no. While it won't break anything technically, using non-standard status codes in production APIs can confuse API consumers, monitoring tools, and automated systems. Some developers use it as a fun Easter egg on a dedicated endpoint (like /teapot), but for actual error handling, always use the appropriate standard status code. If you're rejecting a request, use 400, 403, or 404 as appropriate.
What is HTCPCP? +
HTCPCP stands for Hyper Text Coffee Pot Control Protocol. It was defined in RFC 2324, published on April 1, 1998, by Larry Masinter at Xerox PARC. The protocol humorously defines how to control, monitor, and diagnose coffee pots over the internet, including the BREW method for starting coffee and the WHEN method for stopping the pour. The 418 status code is returned when you try to brew coffee with a teapot. It was updated in 2014 by RFC 7168, which extended HTCPCP to support tea preparation.

Monitor Your Website 24/7

Track uptime, response codes, and performance across all your endpoints - teapots included.

Start Free Monitoring