HTTP Status Codes
Comprehensive reference for HTTP status codes with descriptions and use cases.
Continue
The server has received the request headers and the client should proceed to send the request body.
Common Use Cases:
- Large file uploads with Expect: 100-continue header
- Client checking if server will accept request before sending body
Switching Protocols
The server is switching protocols as requested by the client in the Upgrade header.
Common Use Cases:
- WebSocket connections
- HTTP to HTTPS upgrades
Processing
The server has received and is processing the request, but no response is available yet.
Common Use Cases:
- WebDAV long-running requests
- Server-side processing of complex requests
Early Hints
Used to return some response headers before final HTTP message.
Common Use Cases:
- Preloading resources while server prepares response
- Link headers for CSS/JS
OK
The request succeeded. The meaning depends on the HTTP method used.
Common Use Cases:
- Successful GET request
- Successful POST with response body
- General successful request
Created
The request succeeded and a new resource was created as a result.
Common Use Cases:
- Successful POST creating a new resource
- User registration
- Creating database records
Accepted
The request has been accepted for processing, but processing is not complete.
Common Use Cases:
- Asynchronous operations
- Background job queuing
- Batch processing requests
Non-Authoritative Information
The request was successful but the enclosed payload has been modified from the origin server's 200 OK response.
Common Use Cases:
- Proxy servers modifying responses
- Cached responses with modifications
No Content
The server successfully processed the request but is not returning any content.
Common Use Cases:
- Successful DELETE request
- Successful PUT with no response needed
- Save actions
Reset Content
The server successfully processed the request and the client should reset the document view.
Common Use Cases:
- Form submissions that should clear the form
- Document editing applications
Partial Content
The server is delivering only part of the resource due to a range header sent by the client.
Common Use Cases:
- Video/audio streaming
- Resumable file downloads
- Pagination of large datasets
Multiple Choices
The request has more than one possible response. The user should choose one.
Common Use Cases:
- Multiple file format options
- Language selection
- Multiple resource representations
Moved Permanently
The URL of the requested resource has been changed permanently.
Common Use Cases:
- Website migrations
- URL restructuring
- SEO-friendly permanent redirects
Found
The URI of requested resource has been changed temporarily.
Common Use Cases:
- Temporary redirects
- A/B testing
- Maintenance mode redirects
See Other
The server sent this response to direct the client to get the requested resource at another URI with a GET request.
Common Use Cases:
- POST-Redirect-GET pattern
- Form submission redirects
- Preventing duplicate submissions
Not Modified
This is used for caching purposes. It tells the client that the response has not been modified.
Common Use Cases:
- Browser caching
- Conditional GET requests
- ETags and If-Modified-Since headers
Temporary Redirect
The server sends this response to direct the client to get the requested resource at another URI with the same method.
Common Use Cases:
- Temporary redirects preserving method
- Server maintenance
- Load balancing
Permanent Redirect
The resource is now permanently located at another URI, and the client should use the same method.
Common Use Cases:
- Permanent redirects preserving POST/PUT
- API versioning
- Domain migrations
Bad Request
The server cannot process the request due to a client error (e.g., malformed request syntax).
Common Use Cases:
- Invalid JSON in request body
- Missing required parameters
- Malformed request syntax
Unauthorized
The client must authenticate itself to get the requested response.
Common Use Cases:
- Missing authentication credentials
- Invalid API key
- Expired authentication token
Payment Required
Reserved for future use. Originally intended for digital payment systems.
Common Use Cases:
- Digital payment systems (future use)
- Paywalled content
- Subscription required
Forbidden
The client does not have access rights to the content.
Common Use Cases:
- Authenticated but lacking permissions
- IP address blocked
- Access to admin resources
Not Found
The server cannot find the requested resource.
Common Use Cases:
- Invalid URL
- Deleted resource
- Typo in URL
- Resource never existed
Method Not Allowed
The request method is known by the server but is not supported by the target resource.
Common Use Cases:
- POST to read-only endpoint
- DELETE not allowed
- Unsupported HTTP method
Not Acceptable
The server cannot produce a response matching the list of acceptable values in the request headers.
Common Use Cases:
- Accept header mismatch
- Unsupported content type
- Language not available
Proxy Authentication Required
Authentication is needed to be done by a proxy.
Common Use Cases:
- Corporate proxy authentication
- Network proxy requiring login
Request Timeout
The server would like to shut down this unused connection.
Common Use Cases:
- Slow client connections
- Idle connections
- Network latency issues
Conflict
The request conflicts with the current state of the server.
Common Use Cases:
- Version conflicts in updates
- Duplicate resource creation
- Concurrent modification conflicts
Gone
The requested content has been permanently deleted from server, with no forwarding address.
Common Use Cases:
- Permanently deleted resources
- Deprecated API endpoints
- Removed content with no redirect
Length Required
Server rejected the request because the Content-Length header is not defined.
Common Use Cases:
- POST/PUT without Content-Length
- Upload requests missing size
Precondition Failed
The client has indicated preconditions in its headers which the server does not meet.
Common Use Cases:
- If-Match header mismatch
- Conditional requests
- Optimistic locking failures
Payload Too Large
Request entity is larger than limits defined by server.
Common Use Cases:
- File upload too large
- Request body exceeds limit
- Image upload size limit
URI Too Long
The URI requested by the client is longer than the server is willing to interpret.
Common Use Cases:
- Extremely long query strings
- Too many URL parameters
- GET with excessive data
Unsupported Media Type
The media format of the requested data is not supported by the server.
Common Use Cases:
- Wrong Content-Type header
- Uploading unsupported file format
- JSON expected but XML sent
Range Not Satisfiable
The range specified by the Range header field in the request can't be fulfilled.
Common Use Cases:
- Invalid byte range in partial content request
- Range exceeds file size
Expectation Failed
The expectation indicated by the Expect request header field can't be met by the server.
Common Use Cases:
- Expect: 100-continue not supported
- Server cannot meet client expectations
I'm a teapot
The server refuses to brew coffee because it is, permanently, a teapot.
Common Use Cases:
- April Fools joke (RFC 2324)
- Easter eggs
- Humorous error pages
Misdirected Request
The request was directed at a server that is not able to produce a response.
Common Use Cases:
- HTTP/2 connection reuse issues
- Server cannot handle request
Unprocessable Entity
The request was well-formed but was unable to be followed due to semantic errors.
Common Use Cases:
- Validation errors
- Business logic violations
- Invalid data format
Locked
The resource that is being accessed is locked.
Common Use Cases:
- WebDAV locked resources
- File being edited by another user
Failed Dependency
The request failed due to failure of a previous request.
Common Use Cases:
- WebDAV dependent request failures
- Transaction rollbacks
Too Early
The server is unwilling to risk processing a request that might be replayed.
Common Use Cases:
- Early data in TLS 1.3
- Replay attack prevention
Upgrade Required
The server refuses to perform the request using the current protocol.
Common Use Cases:
- HTTP to HTTPS upgrade required
- Protocol version upgrade needed
Precondition Required
The server requires the request to be conditional.
Common Use Cases:
- Preventing lost updates
- Requiring If-Match header
- Conditional requests
Too Many Requests
The user has sent too many requests in a given amount of time (rate limiting).
Common Use Cases:
- API rate limiting
- DDoS protection
- Throttling excessive requests
Request Header Fields Too Large
The server is unwilling to process the request because its header fields are too large.
Common Use Cases:
- Excessive cookies
- Large custom headers
- Header size limits
Unavailable For Legal Reasons
The user requests an illegal resource, such as a web page censored by a government.
Common Use Cases:
- Government censorship
- DMCA takedowns
- Geoblocking
- Legal restrictions
Internal Server Error
The server has encountered a situation it does not know how to handle.
Common Use Cases:
- Unhandled exceptions
- Application crashes
- Database errors
- Generic server failures
Not Implemented
The request method is not supported by the server and cannot be handled.
Common Use Cases:
- Unimplemented HTTP methods
- Future API endpoints
- Unsupported functionality
Bad Gateway
The server, while working as a gateway to get a response needed to handle the request, got an invalid response.
Common Use Cases:
- Upstream server errors
- Proxy server issues
- Load balancer failures
- Microservice communication errors
Service Unavailable
The server is not ready to handle the request, often due to maintenance or overload.
Common Use Cases:
- Server maintenance
- Temporary overload
- Database connection failures
Gateway Timeout
The server is acting as a gateway and cannot get a response in time from the upstream server.
Common Use Cases:
- Slow upstream servers
- Network timeouts
- Backend processing delays
- Database query timeouts
HTTP Version Not Supported
The HTTP version used in the request is not supported by the server.
Common Use Cases:
- Outdated HTTP protocol
- Server not supporting HTTP/2 or HTTP/3
Variant Also Negotiates
The server has an internal configuration error.
Common Use Cases:
- Content negotiation misconfiguration
- Circular reference in negotiation
Insufficient Storage
The server is unable to store the representation needed to complete the request.
Common Use Cases:
- Disk space full
- Storage quota exceeded
- WebDAV storage issues
Loop Detected
The server detected an infinite loop while processing the request.
Common Use Cases:
- Circular redirects
- WebDAV infinite loops
- Recursive request handling
Not Extended
Further extensions to the request are required for the server to fulfill it.
Common Use Cases:
- Additional extensions needed
- Protocol extension requirements
Network Authentication Required
The client needs to authenticate to gain network access.
Common Use Cases:
- Captive portals
- Wi-Fi login pages
- Network access control
About HTTP Status Codes
HTTP status codes are three-digit codes that servers send in response to client requests. They indicate whether the request was successful, redirected, resulted in an error, or requires further action.
Status Code Categories
- 1xx - Informational responses
- 2xx - Successful responses
- 3xx - Redirection messages
- 4xx - Client error responses
- 5xx - Server error responses
Most Common Codes
- 200 - OK (successful request)
- 201 - Created (resource created)
- 301 - Moved Permanently (redirect)
- 400 - Bad Request (client error)
- 401 - Unauthorized (auth required)
- 404 - Not Found (resource missing)
- 500 - Internal Server Error