2xx · Successful
200
OK
The request succeeded. What the body contains depends on the method: the resource for GET, the result of the action for POST.
When to use it: The default answer to a request that worked. When something new was made, 201 says more.
Defined in RFC 9110 §15.3.1
201
Created
The request succeeded and created one or more new resources.
When to use it: The answer to a POST or PUT that created something, with a Location header pointing at the new resource.
Defined in RFC 9110 §15.3.2
202
Accepted
The request has been accepted for processing, but the processing has not finished and may still fail.
When to use it: For work that runs in the background — a queued job, a batch import — ideally with a link where the client can check its progress.
Defined in RFC 9110 §15.3.3
203
Non-Authoritative Information
The request succeeded, but a proxy in between has changed the response it got from the origin server.
When to use it: Sent by transforming proxies to say the content is not exactly what the origin sent. Rarely seen.
Defined in RFC 9110 §15.3.4
204
No Content
The request succeeded and there is deliberately no body in the response.
When to use it: A common answer to a DELETE, or to a PUT where the client needs no copy back.
Defined in RFC 9110 §15.3.5
205
Reset Content
The request succeeded and the client should reset the view that sent it, such as clearing a form.
When to use it: Meant for data-entry interfaces that want the form emptied for the next entry. Browsers do little with it in practice.
Defined in RFC 9110 §15.3.6
206
Partial Content
The server is sending only the part of the resource that the client asked for in a Range header.
When to use it: How video seeking, resumed downloads and download managers fetch a file in pieces.
Defined in RFC 9110 §15.3.7
207
Multi-Status
A WebDAV response whose XML body holds a separate status for each of several resources.
When to use it: For a single request that acted on many items, where some may have succeeded and others failed.
Defined in RFC 4918
208
Already Reported
Used inside a WebDAV 207 response to say a resource's members were already listed earlier in the same response.
When to use it: Stops the same item being repeated when a collection is reachable through more than one binding.
Defined in RFC 5842
226
IM Used
The server has fulfilled a GET and the response is the result of instance manipulations, such as a delta, applied to the current resource.
When to use it: Part of HTTP delta encoding (RFC 3229), where a client asks for only what changed since its copy. Rarely implemented.
Defined in RFC 3229
3xx · Redirection
300
Multiple Choices
The resource has several representations, and the client or the user should choose one.
When to use it: Seldom used, because there is no standard way to choose automatically; servers usually pick one and send it.
Defined in RFC 9110 §15.4.1
301
Moved Permanently
The resource has a new permanent address, given in the Location header, and links should be updated to it.
When to use it: For a page that has moved for good. Search engines pass its ranking to the new address. A client may turn a POST into a GET when following it, so use 308 where the method matters.
Defined in RFC 9110 §15.4.2
302
Found
Also known as: Moved Temporarily
The resource is temporarily at another address, given in the Location header; the original address stays the right one to use.
When to use it: For a short-term move, such as sending visitors to a login page. Clients may change POST to GET when following it; 307 forbids that.
Defined in RFC 9110 §15.4.3
303
See Other
The answer is at another address, and the client should fetch it with a GET.
When to use it: The classic reply after a form POST (Post/Redirect/Get), so reloading the result page does not submit the form again.
Defined in RFC 9110 §15.4.4
304
Not Modified
The client's cached copy is still current, so the server sends no body.
When to use it: The answer to a conditional GET with If-None-Match or If-Modified-Since when nothing has changed. Not an error: it is caching working.
Defined in RFC 9110 §15.4.5
305
Use Proxy
Not in useOnce told the client to repeat the request through the proxy named in the Location header.
When to use it: Deprecated for security reasons, since it let a response reroute traffic through a proxy of its choosing. Do not send it.
Defined in RFC 9110 §15.4.6
306
(Unused)
Not in useReserved. An earlier draft defined it as Switch Proxy, and it was never used.
When to use it: Never send it. The number stays reserved so it is not reused.
Defined in RFC 9110 §15.4.7
307
Temporary Redirect
The resource is temporarily at the address in the Location header, and the client must repeat the request there with the same method and body.
When to use it: The temporary redirect to use when a POST must stay a POST. HSTS upgrades from http to https also show up in browsers as a 307.
Defined in RFC 9110 §15.4.8
308
Permanent Redirect
The resource has moved permanently to the address in the Location header, and the client must keep the same method and body.
When to use it: A permanent redirect for an API or any endpoint that takes POST or PUT, where a 301 could turn the request into a GET.
Defined in RFC 9110 §15.4.9
4xx · Client error
400
Bad Request
The server cannot process the request because of something it sees as a client error, such as malformed syntax.
When to use it: For a request that cannot be parsed at all: broken JSON, an invalid header, a missing required parameter.
Defined in RFC 9110 §15.5.1
401
Unauthorized
The request lacks valid authentication credentials for the resource. Despite the name, it is about authentication, not permission.
When to use it: When the client has not logged in or its token has expired. The response must include a WWW-Authenticate header saying how to authenticate.
Defined in RFC 9110 §15.5.2
402
Payment Required
Reserved for future use. The specification has never defined what it should do.
When to use it: Some APIs send it when a subscription has lapsed or a payment failed, but there is no standard behaviour behind it.
Defined in RFC 9110 §15.5.3
403
Forbidden
The server understood the request and refuses to fulfil it. Sending the same credentials again will not change the answer.
When to use it: When the user is known but not allowed: someone else's account, an admin page, a blocked country or IP address.
Defined in RFC 9110 §15.5.4
404
Not Found
The server has nothing at this address, or will not say whether it does.
When to use it: The answer for a broken link or a mistyped URL. Also used instead of 403 to hide that a private resource exists. If it is gone for good, 410 says so.
Defined in RFC 9110 §15.5.5
405
Method Not Allowed
The method is known to the server but not supported by this resource.
When to use it: For a POST to a read-only address, or a DELETE where nothing can be deleted. The response must list the allowed methods in an Allow header.
Defined in RFC 9110 §15.5.6
406
Not Acceptable
The server cannot produce a response in any format the client said it would accept in its Accept headers.
When to use it: Content negotiation that found nothing in common, such as a client that accepts only XML from an API that only speaks JSON. Most servers send their default format instead.
Defined in RFC 9110 §15.5.7
407
Proxy Authentication Required
Like 401, but it is a proxy between the client and the server that needs the client to authenticate.
When to use it: Sent by corporate and other authenticating proxies, with a Proxy-Authenticate header saying how.
Defined in RFC 9110 §15.5.8
408
Request Timeout
The server gave up waiting for the client to finish sending its request.
When to use it: Sent on an idle connection before the server closes it. Clients may simply retry the request on a new connection.
Defined in RFC 9110 §15.5.9
409
Conflict
The request conflicts with the current state of the resource.
When to use it: An edit based on an out-of-date version, a username that is already taken, or uploading a file whose name is already in use.
Defined in RFC 9110 §15.5.10
410
Gone
The resource used to be here and has been removed on purpose, with no forwarding address.
When to use it: For content taken down for good. It tells search engines more firmly than 404 that the page will not come back.
Defined in RFC 9110 §15.5.11
411
Length Required
The server refuses a request that has a body but no Content-Length header.
When to use it: Sent by servers that will not accept chunked uploads of unknown length.
Defined in RFC 9110 §15.5.12
412
Precondition Failed
A condition in the request headers, such as If-Match or If-Unmodified-Since, was not met.
When to use it: Protects against lost updates: the resource changed since the client last read it, so the write is refused.
Defined in RFC 9110 §15.5.13
413
Content Too Large
Also known as: Payload Too Large, Request Entity Too Large
The request body is larger than the server is willing or able to handle. RFC 9110 renamed it from Payload Too Large.
When to use it: An upload over the size limit. If the limit is temporary, a Retry-After header says when to try again.
Defined in RFC 9110 §15.5.14
414
URI Too Long
Also known as: Request-URI Too Long
The URI in the request is longer than the server is willing to read.
When to use it: Usually a form sent as GET with a huge query string, or a redirect loop that kept adding to the URL. Send the data as a POST body instead.
Defined in RFC 9110 §15.5.15
415
Unsupported Media Type
The server refuses the request because the body is in a format it does not support.
When to use it: A wrong or missing Content-Type, such as form data sent to an endpoint that only takes application/json.
Defined in RFC 9110 §15.5.16
416
Range Not Satisfiable
Also known as: Requested Range Not Satisfiable
None of the ranges in the request's Range header overlap the resource.
When to use it: Asking for bytes past the end of the file, often a resumed download of a file that has since become smaller.
Defined in RFC 9110 §15.5.17
417
Expectation Failed
The server cannot meet the requirement in the request's Expect header.
When to use it: Mostly seen when a proxy or server does not support Expect: 100-continue. Retrying without the header usually works.
Defined in RFC 9110 §15.5.18
418
(Unused)
Not in useAlso known as: I'm a teapot
The April Fools' code from RFC 2324: a teapot refusing to brew coffee. RFC 9110 reserves the number so it is never given a real meaning.
When to use it: Not for production. Some sites send it as an Easter egg or to turn away bots, but clients cannot be expected to understand it.
Defined in RFC 9110 §15.5.19
421
Misdirected Request
The request reached a server that cannot produce a response for the host it names.
When to use it: Mostly happens with HTTP/2 connection reuse, when one connection is shared across hostnames the server is not set up for. The client should retry on a new connection.
Defined in RFC 9110 §15.5.20
422
Unprocessable Content
Also known as: Unprocessable Entity
The server understands the content type and the syntax is correct, but it cannot process what the request contains. Formerly Unprocessable Entity.
When to use it: The usual answer to a validation error in a well-formed request. Part of HTTP itself since RFC 9110, not only WebDAV.
Defined in RFC 9110 §15.5.21
423
Locked
The WebDAV resource being accessed is locked.
When to use it: A file another user has locked for editing.
Defined in RFC 4918
424
Failed Dependency
The request failed because another action it depended on failed.
When to use it: In a WebDAV batch, the operations that could not run because an earlier one in the same request failed.
Defined in RFC 4918
425
Too Early
The server will not risk processing a request that might be replayed.
When to use it: For requests sent as TLS 1.3 early data (0-RTT), which an attacker could repeat. The client should retry once the handshake is complete.
Defined in RFC 8470
426
Upgrade Required
The server refuses the request over the current protocol, but would accept it after the client upgrades.
When to use it: Sent with an Upgrade header naming the protocol required, for example a newer version of HTTP or TLS.
Defined in RFC 9110 §15.5.22
428
Precondition Required
The server requires the request to be conditional, with a header such as If-Match.
When to use it: Forces clients to prove which version they are changing, so two edits cannot overwrite each other without anyone noticing.
Defined in RFC 6585
429
Too Many Requests
The client has sent too many requests in a given amount of time.
When to use it: Rate limiting. A Retry-After header says how long to wait; clients should back off rather than retry straight away.
Defined in RFC 6585
431
Request Header Fields Too Large
The server will not process the request because its headers, or one header, are too large.
When to use it: Most often an oversized cookie, or too many cookies for one domain. Clearing the site's cookies usually fixes it.
Defined in RFC 6585
451
Unavailable For Legal Reasons
The server is refusing access to the resource because of a legal demand.
When to use it: Content blocked by a court order, a government request or a takedown in one country. The number is a nod to the novel Fahrenheit 451.
Defined in RFC 7725
5xx · Server error
500
Internal Server Error
The server hit an unexpected condition that prevented it from fulfilling the request.
When to use it: The catch-all for a crash or unhandled exception. The server's own logs say what really happened; the client usually cannot fix it.
Defined in RFC 9110 §15.6.1
501
Not Implemented
The server does not support the functionality needed to fulfil the request.
When to use it: A method the server does not recognise at all. Unlike 405, it means no resource on this server supports it.
Defined in RFC 9110 §15.6.2
502
Bad Gateway
A server acting as a gateway or proxy got an invalid response, or no response, from the server behind it.
When to use it: The application behind nginx, a load balancer or a CDN has crashed, restarted or is unreachable.
Defined in RFC 9110 §15.6.3
503
Service Unavailable
The server cannot handle the request right now, because it is overloaded or down for maintenance.
When to use it: A temporary condition. Send a Retry-After header saying when to come back; search engines treat a 503 as temporary and keep the page.
Defined in RFC 9110 §15.6.4
504
Gateway Timeout
A server acting as a gateway or proxy did not get a timely response from the server behind it.
When to use it: A slow database query or a backend that takes longer than the proxy's timeout to answer.
Defined in RFC 9110 §15.6.5
505
HTTP Version Not Supported
The server does not support the major version of HTTP used in the request.
When to use it: Rare, since nearly every server speaks HTTP/1.1, HTTP/2 and often HTTP/3.
Defined in RFC 9110 §15.6.6
506
Variant Also Negotiates
A server configuration error in transparent content negotiation: the chosen variant is itself set up to negotiate, which would loop.
When to use it: Comes from experimental content negotiation (RFC 2295) and is almost never seen.
Defined in RFC 2295
507
Insufficient Storage
The server cannot store what the request needs it to store.
When to use it: A WebDAV upload or copy when the disk or the user's quota is full.
Defined in RFC 4918
508
Loop Detected
The server stopped a WebDAV operation because it found an infinite loop.
When to use it: A request with Depth: infinity across bindings that point back at each other.
Defined in RFC 5842
510
Not Extended
Not in useThe request needs further extensions that the server requires before it will fulfil it.
When to use it: Comes from the HTTP Extension Framework (RFC 2774), which has since been moved to historic status, and the registry marks the code obsolete. Do not send it.
Defined in RFC 2774
511
Network Authentication Required
The client must authenticate to get network access at all.
When to use it: Sent by captive portals, such as hotel or airport Wi-Fi login pages, intercepting traffic until the user signs in.
Defined in RFC 6585