418

I'm a teapot

Overview

418 I'm a teapot is a status code defined as an April Fools' joke in 1998 (RFC 2324, the Hyper Text Coffee Pot Control Protocol). It represents a teapot refusing a request to brew coffee: "I'm a teapot, so I can't make coffee."

It is not a serious code, but many frameworks and sites implement it as an easter egg. It shows up for fun, or as a playful refusal aimed at bots and scrapers.

When it happens

Request / Response example

Request
BREW /coffee HTTP/1.1
Host: teapot.example.com
Content-Type: application/coffee-pot-command

start
Response
HTTP/1.1 418 I'm a teapot
Content-Type: text/plain

I'm a teapot. I cannot brew coffee.

In code

app.get('/coffee', (req, res) => {
  res.status(418).send("I'm a teapot");
});
curl -i https://teapot.example.com/coffee
# HTTP/1.1 418 I'm a teapot

Common causes

How to fix

Notes

Related status codes

Specification