418 I’m a teapot

An April Fools’ joke from 1998 that stuck around.

When to use it

Easter eggs only.

Common causes and fixes

418 comes from RFC 2324, the Hyper Text Coffee Pot Control Protocol, an April Fools’ RFC from 1998. It was never part of HTTP, but many frameworks implement it, and a 2017 proposal to remove it from Node.js and Go was dropped after a public campaign. RFC 9110 now marks the code as reserved, so nothing else can take it.

In the wild you meet 418 when a site or bot filter answers scrapers with it as a “go away” signal, or on easter egg pages. Don’t use it in a real API: clients, monitoring and retry logic won’t know what it means. Choose 403 or 429 for blocking traffic, and 400 or 422 for bad input, so tools and people can react correctly.

Client error (4xx)

4xx codes are client errors: the request itself is wrong, unauthorised or points at something that isn’t there. Retrying the same request won’t help.

What it looks like

HTTP/1.1 418 I’m a teapot

How to send it

Node.js / Expressres.status(418).end()
Python / Flaskreturn '', 418
nginxreturn 418;

How to check it

curl -s -o /dev/null -w "%{http_code}\n" https://example.com/

Open HTTP Status Codes