Skip to content

HTTP status codes, quick reference

The 2xx, 3xx, 4xx and 5xx codes you will actually see in server and application logs, and what usually causes them.

4
Sections
2 min
Read time

2xx: success

CodeNameMeaning
200OKThe request worked
201CreatedA new resource was created (APIs)
204No ContentSuccess, with nothing to return

3xx: redirects

CodeNameMeaning
301Moved PermanentlyThe page has a new address for good; search engines move ranking to it
302FoundTemporary redirect
304Not ModifiedThe browser's cached copy is still valid
307 / 308Temporary / Permanent RedirectLike 302 / 301 but the request method is kept

4xx: client errors

CodeNameUsual cause
400Bad RequestMalformed request or invalid data
401UnauthorizedLogin or token missing or wrong
403ForbiddenLogged in, or not, but not allowed: file permissions, firewall or WAF rule
404Not FoundWrong URL, deleted page, or a rewrite rule problem
405Method Not Allowede.g. a POST to a page that only accepts GET
413Content Too LargeUpload bigger than the server limit
429Too Many RequestsRate limit reached

5xx: server errors

CodeNameUsual cause
500Internal Server ErrorAn error in the application code or configuration; check the error log
502Bad GatewayThe proxy could not get a valid answer from the application (PHP-FPM, Node.js stopped or crashed)
503Service UnavailableOverloaded or in maintenance
504Gateway TimeoutThe application took too long to answer: slow queries or external calls

For 5xx errors the browser rarely tells you much. The web server's error log and the application log give the real reason.