HTTP Status Codes Reference

HTTP/1.1 standard status codes organized by category. Frequently used codes are highlighted in bold.

Code Name Description

Status Code Categories

Commonly Confused Status Code Pairs

These codes look similar but serve different purposes. Mixing them up is a frequent source of bugs in API design, SEO, and debugging.

200 OK vs 204 No Content

301 vs 302 vs 307 vs 308 - Four Redirect Flavors

401 Unauthorized vs 403 Forbidden

404 Not Found vs 410 Gone

500 vs 502 vs 503 vs 504 - Four Server Error Flavors

400 Bad Request vs 422 Unprocessable Entity

Frequently Asked Questions

What is the difference between 401 and 403?

401 (Unauthorized) means authentication is required (not logged in), while 403 (Forbidden) means you are authenticated but lack permission for the resource.

What is the difference between 301 and 302?

301 (Moved Permanently) is a permanent move, 302 (Found) is temporary. For SEO, use 301 when permanent so search engines transfer authority to the new URL.

What is the difference between 500 and 502?

500 (Internal Server Error) is a generic server-side error, while 502 (Bad Gateway) means a gateway/proxy received an invalid response from the upstream backend.

Is 418 I'm a teapot a real standard?

It is a joke RFC (RFC 2324) defined on April Fools' Day 1998, but it is actually registered with IANA. It is not for production use, though some services use it as an Easter egg.