418 I'm a teapot
An April Fools' joke code from the Hyper Text Coffee Pot Control Protocol: a teapot refusing to brew coffee.
What 418 I'm a teapot means
418 comes from RFC 2324, published on 1 April 1998, which defined the Hyper Text Coffee Pot Control Protocol (HTCPCP) for controlling coffee pots over a network. A teapot asked to brew coffee answers 418 I'm a teapot.
It was never a real HTTP status, but many frameworks and sites added it as an Easter egg. Because it is so widely used, RFC 9110 reserves 418 so it will not be given a real meaning later.
Common causes
- A developer returning it as a joke or Easter egg.
- A server or bot filter using it as an unusual way to refuse requests.
How to fix 418 I'm a teapot
- As a visitor, nothing is broken on your side. The site chose to send it.
- If your script or scraper gets 418, the site may be blocking automated traffic; check its terms and rate limits.
- In your own API, use a standard code such as 403 or 400 for real refusals.
Example response
HTTP/1.1 418 I'm a teapot
Content-Type: text/plain; charset=utf-8
418 I'm a teapotHow to check for a 418 response
cURL
# Print only the status code
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/JavaScript (Node.js)
const res = await fetch("https://example.com/");
if (res.status === 418) {
console.log(res.status, res.statusText);
}Python
import requests
res = requests.get("https://example.com/")
if res.status_code == 418:
print(res.status_code, res.reason)Go
res, err := http.Get("https://example.com/")
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
if res.StatusCode == 418 {
fmt.Println(res.Status)
}Specification
418 I'm a teapot is defined in RFC 9110, section 15.5.19.
Related status codes
- 400
The server could not understand the request because something in it is malformed, like broken JSON, bad syntax or invalid headers.
- 403
The server understood the request but refuses to allow it. Logging in again will not help unless your account gets access.
- 501
The server does not support the functionality needed for the request, typically an HTTP method it does not recognise.