HTTP Status Codes
Every HTTP status code explained in plain words: what it means, when to send it and an example response. Free reference.
404 Not Found
There is nothing at this address.
When to use it: The URL or item does not exist. Also used to hide that a private item exists.
HTTP/1.1 404 Not Found
Content-Type: application/json
{"error": "user 7 not found"}| Code | Name | Meaning | When to use it |
|---|---|---|---|
| Continue | The start of the request was received; the client may send the rest. | Sent when a client asked "Expect: 100-continue" before a large upload. | |
| Switching Protocols | The server agrees to change protocol as asked. | Upgrading a connection to WebSocket. | |
| Processing | The server is working on a long request (WebDAV). | Rarely used; keeps a WebDAV client from timing out. | |
| Early Hints | Headers the client can use to start loading resources before the final response. | Send Link: rel=preload headers early while the page is being built. | |
| OK | The request worked and the response holds the result. | The normal answer to a GET, or a POST/PUT that returns the result. | |
| Created | A new resource was created. | After a successful POST that creates something. Include a Location header for the new resource. | |
| Accepted | The request was accepted but is not finished. | For work done later (a queued job). Tell the client where to check the result. | |
| Non-Authoritative Information | The response was changed by a proxy. | Sent by transforming proxies; seldom needed. | |
| No Content | It worked and there is nothing to send back. | After a DELETE, or a PUT/PATCH that returns no body. | |
| Reset Content | It worked; the client should reset the form or view. | After a form submit where the form should be cleared. | |
| Partial Content | Only the requested part of the file is sent. | Answering a Range request, for video seeking or resumable downloads. | |
| Multi-Status | Several results in one response (WebDAV). | Batch operations where each item has its own status. | |
| Already Reported | Members were already listed earlier in the response (WebDAV). | Avoids repeating a resource in a WebDAV binding. | |
| IM Used | The response is the result of an instance manipulation. | Delta encoding; almost never used. | |
| Multiple Choices | There are several possible answers; the client picks. | Rare. Listing alternative representations of a resource. | |
| Moved Permanently | The resource has a new address for good. | A permanent redirect, such as moving to HTTPS or a new URL. Search engines transfer ranking. | |
| Found | The resource is temporarily at another address. | A temporary redirect, for example after login. The client keeps using the old URL. | |
| See Other | Get the result from another address with GET. | Redirect after a POST so a refresh does not repeat it (Post/Redirect/Get). | |
| Not Modified | The cached copy is still good. | Answering a conditional GET (If-None-Match / If-Modified-Since) with no body. | |
| Use Proxy | Use a proxy to reach the resource (deprecated). | Do not use. | |
| Temporary Redirect | Temporarily elsewhere; repeat the same method and body. | Like 302 but guarantees a POST stays a POST. | |
| Permanent Redirect | Permanently elsewhere; repeat the same method and body. | Like 301 but guarantees the method is not changed. | |
| Bad Request | The request is malformed or invalid. | Broken JSON, missing required fields, or a value of the wrong type. | |
| Unauthorized | The request has no valid credentials. | The user is not signed in or the token is missing or expired. (The name is historic: it means "unauthenticated".) | |
| Payment Required | Payment is needed. | Reserved; some APIs use it for exhausted plans or billing problems. | |
| Forbidden | The server understood but refuses. | The user is signed in but is not allowed to do this. | |
| Not Found | There is nothing at this address. | The URL or item does not exist. Also used to hide that a private item exists. | |
| Method Not Allowed | The method is not supported for this address. | POST to a read-only endpoint. Send an Allow header listing valid methods. | |
| Not Acceptable | Nothing matches the formats the client accepts. | The Accept header asks for a type the server cannot produce. | |
| Proxy Authentication Required | The proxy needs credentials. | A proxy in front of the server asks the client to sign in. | |
| Request Timeout | The server gave up waiting for the request. | The client was too slow sending the request. | |
| Conflict | The request clashes with the current state. | Creating something that already exists, or an edit based on an old version. | |
| Gone | The resource used to exist and is permanently removed. | Deleted for good; tells search engines to drop it faster than a 404. | |
| Length Required | A Content-Length header is required. | Rejecting an upload that did not say how big it is. | |
| Precondition Failed | A condition in the request headers was not met. | If-Match failed: the item changed since the client last saw it. | |
| Content Too Large | The request body is too big. | An upload over the size limit. | |
| URI Too Long | The address is too long. | A query string beyond what the server accepts; use POST instead. | |
| Unsupported Media Type | The body format is not supported. | Sending XML to an endpoint that accepts only JSON. | |
| Range Not Satisfiable | The requested byte range is outside the file. | A Range request that starts past the end of the file. | |
| Expectation Failed | The Expect header cannot be met. | Rejecting Expect: 100-continue. | |
| I'm a teapot | A joke status from a 1998 April Fools document. | Novelty; some services use it to refuse bots or unwanted requests. | |
| Misdirected Request | The request went to a server that cannot answer it. | HTTP/2 connection reuse for the wrong host. | |
| Unprocessable Content | The request is well formed but its content is invalid. | Validation errors on a field: valid JSON, but the age is negative. | |
| Locked | The resource is locked (WebDAV). | Editing a document someone else holds a lock on. | |
| Failed Dependency | A previous request in the batch failed (WebDAV). | Part of a multi-step WebDAV operation. | |
| Too Early | The server will not risk processing a replayable request. | TLS 1.3 early data that could be replayed. | |
| Upgrade Required | Switch to a different protocol first. | Insisting on TLS or a newer protocol version. | |
| Precondition Required | The request must be conditional. | Forcing If-Match to avoid lost updates. | |
| Too Many Requests | The client is sending requests too fast. | Rate limiting. Send Retry-After. | |
| Request Header Fields Too Large | The headers are too big. | Huge cookies or headers. | |
| Unavailable For Legal Reasons | Blocked because of a legal demand. | Content removed by court order or law. | |
| Internal Server Error | Something went wrong on the server. | An unexpected error. Do not use for client mistakes. | |
| Not Implemented | The server does not support this feature. | A method or feature the server has no code for. | |
| Bad Gateway | A gateway got a bad answer from the server behind it. | The upstream app crashed or returned garbage to your proxy (Nginx, load balancer). | |
| Service Unavailable | The server cannot handle requests right now. | Maintenance or overload. Send Retry-After. | |
| Gateway Timeout | A gateway did not get an answer in time. | The upstream app was too slow behind your proxy. | |
| HTTP Version Not Supported | The HTTP version is not supported. | A request in a protocol version the server refuses. | |
| Variant Also Negotiates | A configuration error in content negotiation. | Misconfigured server. | |
| Insufficient Storage | The server is out of space (WebDAV). | Storing the request would exceed the quota. | |
| Loop Detected | The server found an endless loop (WebDAV). | Circular bindings. | |
| Not Extended | A needed extension is missing. | Rare. | |
| Network Authentication Required | The client must sign in to the network. | Captive portals at hotels and airports. |
Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)
HTTP Status Codes: Meaning, When to Use, Examples
Look up any HTTP status code and see what it means, when to use it and what a real response looks like. Type a number or a word such as "redirect" in the search box. It gives developers a quick browser-based way to solve a focused http status codes task before moving the result into a project.
How to use this list
Search by number (404), by word (timeout) or filter by group with the buttons. Press a code to see an example response you can copy.
Common mistakes
- Returning 200 with an error message in the body: clients and monitoring then think everything worked.
- Using 500 for mistakes made by the caller: use a 4xx code so they know they can fix it.