What Is a 418 Status Code?

Any attempt to brew coffee with a teapot should result in the error code “418 I’m a teapot”. The resulting entity body MAY be short and stout.

This status code is a reference to the Hyper Text Coffee Pot Control Protocol, which was released in 1998 as an April Fools’ joke.

Although this status code started as a joke, websites can technically use it as a response. Some sites use 418s for requests they don’t want to handle, such as automated queries. Use of 418 is rare and is not usually considered best practice.

Reading through the Hyper Text Coffee Pot Control Protocol can be entertaining, however.


Go HTTP Status Constant http.StatusTeapot

Symfony HTTP Status Constant Response::HTTP_I_AM_A_TEAPOT

Additional resources

Return to List of HTTP Status Codes