HTTP Status Codes Cheat Sheet
Developer Updated
A status code is a three-digit number a server returns with every response. The first digit tells you the family.
| Family | Meaning |
|---|
| 1xx | Informational, the request is still going |
| 2xx | Success |
| 3xx | Redirect, look somewhere else |
| 4xx | The request has a problem |
| 5xx | The server has a problem |
2xx success
| Code | Name | Notes |
|---|
| 200 | OK | The request worked |
| 201 | Created | A new resource was made, common after POST |
| 202 | Accepted | Received, processing later |
| 204 | No Content | Worked, and there is nothing to return |
3xx redirects
| Code | Name | Notes |
|---|
| 301 | Moved Permanently | Use for permanent URL changes, so search engines transfer the page |
| 302 | Found | Temporary redirect |
| 304 | Not Modified | The cached copy is still valid |
| 307 | Temporary Redirect | Like 302, keeps the method |
| 308 | Permanent Redirect | Like 301, keeps the method |
4xx client errors
| Code | Name | Notes |
|---|
| 400 | Bad Request | Malformed request or invalid data |
| 401 | Unauthorized | Not signed in, or the credentials are wrong |
| 403 | Forbidden | Signed in but not allowed |
| 404 | Not Found | No such page or resource |
| 405 | Method Not Allowed | The URL does not accept that method |
| 408 | Request Timeout | The client was too slow |
| 409 | Conflict | The request clashes with the current state |
| 410 | Gone | Removed on purpose and not coming back |
| 413 | Content Too Large | The upload is too big |
| 422 | Unprocessable Content | Well-formed but fails validation |
| 429 | Too Many Requests | Rate limit hit, wait and retry |
5xx server errors
| Code | Name | Notes |
|---|
| 500 | Internal Server Error | A bug or crash on the server |
| 502 | Bad Gateway | A proxy got a bad answer from upstream |
| 503 | Service Unavailable | Overloaded or down for maintenance |
| 504 | Gateway Timeout | An upstream server took too long |
For SEO
- Use 301 when a page moves for good.
- Use 404 or 410 for deleted pages, not a 200 page that says “not found”.
- Use 503 with a Retry-After header for short planned downtime.