What Is a 418 I'm a Teapot Error?

Red enamel teapot on a bright yellow background
Photo by Geoff Oliver on Unsplash

You click a link, wait a second, and instead of a web page you get three words: "418 I'm a teapot." Not "page not found." Not "access denied." A teapot. Did the server just have a breakdown?

Short answer: 418 I'm a teapot is a real HTTP status code that started as an April Fools' joke. It means "the server is a teapot, and you asked it to brew coffee." Nobody expects to see it while browsing, but some websites use it on purpose, usually to turn away bots and automated tools.

So how did a joke end up in the official list of web error codes, and why won't it go away? Pour yourself something warm. This one has a good backstory.

What Does 418 I'm a Teapot Mean?

Every time your browser asks a server for something, the server answers with a three-digit status code. The first digit tells you the general category:

  • 2xx means success. 200 OK is the one you get on nearly every normal page load.
  • 3xx means "go somewhere else," like a 301 redirect.
  • 4xx means the request had a problem on the sender's side, like the 403 error this blog is named after, or the famous 404.
  • 5xx means something broke on the server.

The 418 code is the oddball of the 4xx family. Its original definition says that any attempt to brew coffee with a teapot should get "418 I'm a teapot" in response. The spec even adds that the response body "may be short and stout," a nod to the children's song.

In plain terms, the server is saying: "I understand what you want, but I'm the wrong kind of machine, and I'm not going to pretend otherwise."

Where Did the Teapot Come From?

The teapot dates back to April 1, 1998, when an engineer named Larry Masinter published RFC 2324. An RFC (Request for Comments) is a document that describes how some part of the internet works. Most are dead serious, covering things like how email or HTTP itself works. A few, released every April 1st, are jokes. This was one of the jokes.

The document described the Hyper Text Coffee Pot Control Protocol, or HTCPCP, a way to control, monitor and troubleshoot coffee pots over the internet. It was satire aimed at the habit of stretching HTTP to do things it was never designed for. The IETF, the group that oversees internet standards, never endorsed it.

The details are what make it fun:

  • A new BREW method was added because, as the document jokes, POST might be a trademark for coffee.
  • A WHEN method lets you tell the pot to stop pouring milk. As in, "Say when."
  • An Accept-Additions header lets you ask for cream, flavored syrups, or alcohol like whisky, rum and Kahlúa.
  • The URLs start with coffee:// instead of http://, with versions of the word "coffee" in more than two dozen languages.
A coffee maker sitting on top of a white table
Photo by Skyler Smith on Unsplash

Is There a Tea Version Too?

There is. On April 1, 2014, Imran Nazar published RFC 7168, called HTCPCP-TEA, which extended the joke protocol to cover tea and properly handle teapots. Yes, someone waited sixteen years to finish the bit.

The joke specs also thought ahead about combo machines. If a pot that makes both coffee and tea runs out of coffee, it should return a 503 Service Unavailable, not a 418. MDN, the web developer reference, still repeats that advice today.

The Time Developers Saved the Teapot

You'd think a joke code would be harmless. In August 2017, not everyone agreed.

Mark Nottingham, who chairs the IETF working group that maintains HTTP, opened requests asking Node.js, Go, Python's Requests library and ASP.NET to remove support for 418. His reasoning was sensible. It was never a real status code, it came from a joke, and the number might be needed for something genuine later. There are only 100 codes in the 4xx range, after all.

Developers did not take it well. A 15-year-old developer named Shane Brunswick launched the Save 418 movement, complete with a website and a #save418 hashtag. The removal requests collected far more thumbs-down than thumbs-up, and the argument spread fast: the teapot was a harmless reminder that real people with a sense of humor build these systems.

The campaign won. Instead of deleting 418, the standards folks marked it as reserved. The current HTTP specification, RFC 9110, lists 418 as "unused" and explains that it can't be given a real meaning because so many programs already treat it as the teapot. Python even added a named IM_A_TEAPOT constant in version 3.9, years after the scare.

Google got in on the fun too, with a teapot easter egg page that returns a genuine 418 response.

Terminal running curl against google.com/teapot, which returns HTTP/2 418 and the text short and stout
Google's teapot page, tested from a terminal. Still a real 418.

Other Joke and Oddball Status Codes

The teapot has company. Some of these are official, some are made up by individual companies, and all of them are real things you could run into:

CodeNameWhere it comes from
418I'm a teapotThe 1998 April Fools' coffee pot protocol. Now officially reserved.
451Unavailable For Legal ReasonsAn official code from 2016, used when content is blocked for legal reasons like a court order. The number is a nod to the novel Fahrenheit 451.
420Enhance Your CalmUnofficial. Twitter's old API sent it when apps made too many requests. The official code for that is now 429 Too Many Requests.
444No ResponseUnofficial, used by the Nginx web server. It closes the connection without sending anything at all, often to shut out malicious traffic.
499Client Closed RequestUnofficial, also from Nginx. Logged when the visitor gives up and closes the connection before the server answers.
509Bandwidth Limit ExceededUnofficial, used by some web hosts when a site has used up its monthly bandwidth.

And the teapot isn't the only April Fools' RFC. Others include RFC 1149, which describes sending internet traffic by carrier pigeon, and RFC 3514, which proposed an "evil bit" that malicious network traffic would politely set on itself so firewalls could block it.

Why Do Real Websites Show a 418 Error?

This is the part that confuses people. If 418 is a joke, why is a normal website showing it to you?

Because a server can send any status code it likes, and 418 makes a handy "no thanks." MDN notes that some sites use it for requests they don't want to handle, such as automated queries. A few hosting and bot-blocking setups do the same thing. The code is quirky enough that nobody confuses it with a real outage, and it tells a scraper to go away without giving it much to work with.

A rack of servers in a server room
Photo by Kevin Ache on Unsplash

It has turned up in bigger places too. In late February 2022, right after Russia invaded Ukraine, people noticed that the Russian Ministry of Defence website, mil.ru, was answering requests from outside the country with a 418, apparently as a quick way to shut out unwanted traffic.

So if you see a teapot on a regular site, it usually means one thing. The site decided your request looked automated, suspicious, or unwelcome, and it picked a funny way to say so.

What to Do If You See a 418 Error

There's no single fix, since the site chose to show it. But these steps solve it most of the time:

  1. Reload the page. If the block was triggered by a burst of requests, it may clear on its own after a minute or two.
  2. Turn off your VPN or proxy. Shared VPN addresses get flagged by bot filters a lot, because many people's traffic comes from the same place.
  3. Clear your cache and cookies, or try a different browser or a private window.
  4. Switch networks, for example from home Wi-Fi to your phone's data connection.
  5. Pause any automation. If you're running a script, browser extension or tool that sends lots of requests, stop it and try again by hand.
  6. Contact the site if none of that works. Tell them the time it happened and roughly where you are, so they can find the block in their logs.

If you own the site and your own visitors are getting a teapot, check your firewall, security plugin and hosting settings for bot-blocking rules that are too aggressive. Your host's support team can usually tell you exactly which rule triggered it.

How to Check for a 418 (or Send One Yourself)

Your browser only shows the page, not the status code. To see the actual code a site sends back, run this in Terminal, PowerShell or Command Prompt:

curl -I https://example.com

The first line of the answer shows the status code, like HTTP/2 200 or HTTP/1.1 418. You can also open your browser's developer tools (F12), click the Network tab and reload the page.

And if you're a developer who wants your own teapot, most frameworks support it out of the box. In Python with Flask:

@app.route("/coffee")
def coffee():
    return "I'm a teapot", 418

In Node.js with Express:

app.get("/coffee", (req, res) => {
  res.status(418).send("I'm a teapot");
});

Go even has a built-in constant for it, http.StatusTeapot. Just keep it to easter eggs. For real blocks, use a real code like 403 or 429.

And if you'd rather wear your error codes than run into them, the Server403 shop has a whole Server Errors collection.

Frequently Asked Questions

Is 418 a real HTTP status code?

Sort of. It began as a joke and was never meant for real use, but it's widely supported by web servers and programming languages, and the current HTTP standard officially reserves it so it can't be reused. It isn't going anywhere.

Is a 418 error my fault?

Usually not. The site sent it deliberately, most often because your traffic looked automated. Turning off a VPN or switching networks fixes it most of the time.

Does a 418 mean my computer has a virus?

No. It's a response from the website you visited, not a sign of anything wrong on your device.

What's the difference between a 418 and a 403?

Both mean the server won't give you what you asked for. A 403 Forbidden is the official, serious way to say it. A 418 is the joke version some sites use for bots. If a site is blocking you for real reasons, it should send a 403.

Can I use 418 in my own app?

You can, as an easter egg. But since the code is reserved, it shouldn't carry a real meaning in a production API. Use 403 for access denied and 429 for too many requests.

What should a combined coffee and tea pot return when it's out of coffee?

A 503 Service Unavailable. Yes, the joke spec really thought of that.

TL;DR

The 418 I'm a teapot error came from an April Fools' RFC in 1998 and was nearly deleted from the web in 2017 until developers rallied to save it. Today it's a reserved status code, and the sites that still serve it usually do so to turn away bots. If you see one, reload, turn off your VPN, and try another network. If you're a developer, it makes a great easter egg and a terrible real error message.

From the shop

Shop now →