HTTP Status Codes: Every Code Explained
HTTP status codes are three-digit numbers that a web server sends back in response to a client’s request. They tell the browser (or API client) whether the request succeeded, failed, or requires further action. Every web developer, sysadmin, and SEO professional encounters these codes regularly. Understanding them is essential for debugging, monitoring, and building reliable web applications.
1xx Informational
These interim responses indicate the request was received and processing is continuing.
| Code | Name | Meaning |
|---|---|---|
| 100 | Continue | Server received the request headers, client should proceed with the body |
| 101 | Switching Protocols | Server is switching to the protocol requested (e.g., WebSocket upgrade) |
| 103 | Early Hints | Server sends preliminary headers (preload resources before final response) |
2xx Success
The request was successfully received, understood, and accepted.
| Code | Name | Meaning |
|---|---|---|
| 200 | OK | Standard success. The most common response code. |
| 201 | Created | Resource was successfully created (POST requests) |
| 204 | No Content | Success but no content to return (common for DELETE requests) |
| 206 | Partial Content | Only part of the resource is returned (used by range requests for resumable downloads) |
3xx Redirection
The client must take additional action to complete the request.
| Code | Name | Meaning |
|---|---|---|
| 301 | Moved Permanently | Resource permanently moved to a new URL. Browsers cache this. Search engines transfer link equity. |
| 302 | Found | Temporary redirect. Original URL is still valid. |
| 303 | See Other | Redirect after POST (use GET for the new URL) |
| 304 | Not Modified | Cached version is still valid. Server doesn’t send the body (saves bandwidth) |
| 307 | Temporary Redirect | Like 302 but preserves the HTTP method (POST stays POST) |
| 308 | Permanent Redirect | Like 301 but preserves the HTTP method |
4xx Client Error
The request contains bad syntax or cannot be fulfilled.
| Code | Name | Meaning |
|---|---|---|
| 400 | Bad Request | Server can’t understand the request (malformed syntax, invalid parameters) |
| 401 | Unauthorized | Authentication required (you need to log in) |
| 403 | Forbidden | Authenticated but not authorized (you’re logged in but don’t have permission) |
| 404 | Not Found | The most famous error code. Resource doesn’t exist at this URL |
| 405 | Method Not Allowed | HTTP method not supported (e.g., POST to a read-only endpoint) |
| 408 | Request Timeout | Client took too long to send the complete request |
| 409 | Conflict | Request conflicts with current state (e.g., duplicate resource) |
| 410 | Gone | Like 404 but permanent. The resource existed but was intentionally removed |
| 413 | Payload Too Large | Request body exceeds the server’s size limit |
| 418 | I’m a Teapot | An April Fools joke from RFC 2324 (HTCPCP). Some servers implement it. Not actually useful. |
| 429 | Too Many Requests | Rate limited. You’re sending too many requests too quickly |
| 451 | Unavailable For Legal Reasons | Content blocked due to legal demands (named after Fahrenheit 451) |
5xx Server Error
The server failed to fulfill a valid request.
| Code | Name | Meaning |
|---|---|---|
| 500 | Internal Server Error | Generic “something broke on the server.” Check server logs |
| 502 | Bad Gateway | Upstream server (behind a reverse proxy or load balancer) sent an invalid response |
| 503 | Service Unavailable | Server is temporarily overloaded or under maintenance |
| 504 | Gateway Timeout | Upstream server didn’t respond within the timeout period |
| 507 | Insufficient Storage | Server is out of storage to complete the request |
| 508 | Loop Detected | Server detected an infinite redirect loop |
| 521 | Web Server Is Down | Cloudflare-specific: origin server refused the connection |
| 522 | Connection Timed Out | Cloudflare-specific: origin server didn’t respond in time |
| 523 | Origin Is Unreachable | Cloudflare-specific: can’t reach origin server |
| 524 | A Timeout Occurred | Cloudflare-specific: TCP connection established but HTTP response took too long |
Quick Troubleshooting
Getting 4xx errors? The problem is on your side. Check the URL, your authentication, your request format, or your permissions.
Getting 5xx errors? The problem is on the server side. If it’s not your server, try again later. If it is your server, check your application logs, server resources, and upstream service health.
Getting 3xx loops? You have a redirect misconfiguration. Two URLs are redirecting to each other. Common with HTTP/HTTPS redirects or www/non-www canonicalization.
Test It Yourself
HTTP Headers Checker
Enter any URL and see the status code, response headers, and security configuration.