More
More
418 I'm a teapot
An April Fools' joke from RFC 2324: a teapot refusing to brew coffee. It is reserved, not a real status.
- Code
418- Reason phrase
- I'm a teapot
- Class
- 4xx Client error
- Defined in
- RFC 9110 section 15.5.19 (reserved); the joke itself is RFC 2324 section 2.3.2
- Status
- Unused: RFC 9110 reserves the number because so much software already returns it as a joke.
- Cacheable by default
- No
What it means
Client error: the problem lies with the request. Repeating it unchanged will normally fail again.
When a server should send it. Never as a real error. The number is reserved because many servers return it as a joke from RFC 2324, the April Fools' Hyper Text Coffee Pot Control Protocol. Some sites use it to turn away bots.
Common causes. Some sites and APIs return it on purpose to turn away bots.
What to do. Nothing, unless a service uses it to block you; then treat it like 403.
How clients and crawlers treat it
Browsers and HTTP clients. Clients treat it as an ordinary 4xx client error.
Google Search. Like every 4xx except 429, it tells Google the content does not exist: an indexed URL is removed from the index, and a new one is not processed. Crawl frequency for the URL gradually drops. Source: Google Search Central, How HTTP status codes, and network and DNS errors affect Google Search.
Caching. Not cacheable by default (RFC 9110 section 15.1 does not list it). A cache stores it only when the response says so with Cache-Control or Expires.
Example response
HTTP/1.1 418 I'm a teapot Content-Type: text/plain; charset=utf-8 I'm a teapot
How to send 418
location /example {
return 418;
}
RewriteEngine On RewriteRule ^example$ - [R=418,L]
http_response_code(418); echo 'I\'m a teapot'; exit;
res.writeHead(418, { 'Content-Type': 'text/plain' });
res.end('I\'m a teapot');
# in a view function return 'I\'m a teapot', 418
Change the paths to suit. In nginx, add_header needs always to apply to error responses.
Related codes
- 403ForbiddenThe server understood the request but refuses it.
- 429Too Many RequestsThe client sent too many requests in a given time and is being rate limited.
- 400Bad RequestThe server could not understand the request.
All status codes · All 4xx codes
Names and numbers from the IANA HTTP Status Code Registry. Google Search behaviour as documented by Google Search Central.