418 I'm a teapot
April Fools' joke from 1998 Hyper Text Coffee Pot Control Protocol.
The server refuses to brew coffee because it is, permanently, a teapot.
What HTTP 418 I'm a teapot Means
The server refuses to brew coffee because it is, permanently, a teapot.
April Fools' joke from 1998 Hyper Text Coffee Pot Control Protocol.
Common Causes
- HTCPCP protocol implementation
- Easter egg
- Joke response
How to Fix It (For Visitors)
- This is a joke status code
How to Fix It (For Developers/Admins)
- Don't use in production
- Fun for demonstrations
- Some APIs use it for rate limiting jokes
Returning a 418 I'm a teapot (Code Examples)
If you build APIs or web apps, here is how to send an HTTP 418 response and how to test for it:
Node.js (Express)
app.get('/resource', (req, res) => {
res.status(418).json({ error: 'I'm a teapot' });
});
Python (Flask)
@app.route('/resource')
def resource():
return jsonify(error='I'm a teapot'), 418
PHP
<?php
http_response_code(418);
header('Content-Type: application/json');
echo json_encode(['error' => 'I'm a teapot']);
Check the status with curl
curl -I https://example.com/resource
# Look for: HTTP/1.1 418 I'm a teapot
Frequently Asked Questions
What does HTTP 418 I'm a teapot mean?
April Fools' joke from 1998 Hyper Text Coffee Pot Control Protocol. In short: The server refuses to brew coffee because it is, permanently, a teapot.
Is 418 I'm a teapot a client or server error?
418 is a 4xx client-error code, so the request itself needs to change. The server is running normally and is rejecting the request as it was sent by the browser, app, or API client.
How do I fix a 418 I'm a teapot error?
Don't use in production. Fun for demonstrations. Some APIs use it for rate limiting jokes.
Official Specification
The 418 I'm a teapot status code is defined in RFC 2324.