HTTP status codes
All 63 status codes a server can send, from 100 Continue to 511 Network Authentication Required. Open any code for what it means, why you might be seeing it, how to fix it, and an example response.
Star1xx informational
The request was received and the server is still working on it.
- 100
Continue
The server got the request headers and has not rejected them, so the client should go ahead and send the request body.
- 101
Switching Protocols
The server agrees to switch to the different protocol the client asked for in its Upgrade header, such as WebSocket.
- 102
Processingdeprecated
A WebDAV interim response saying the server accepted the request and is still working on it, so the client should not time out.
- 103
Early Hints
An interim response that sends Link headers early so the browser can preload CSS, fonts or scripts while the server builds the page.
2xx success
The request was received, understood and accepted.
- 200
OK
The request worked. The response body holds the result, such as the page, file or JSON data the client asked for.
- 201
Created
The request worked and created a new resource. The Location header usually points to the URL of the new item.
- 202
Accepted
The server accepted the request for processing, but the work has not finished yet and may still fail later.
- 203
Non-Authoritative Information
The request worked, but a proxy between you and the origin server changed the response before passing it on.
- 204
No Content
The request worked and there is nothing to send back. The response has no body, and the browser stays on the current page.
- 205
Reset Content
The request worked and the client should reset the document view, such as clearing the form the user just submitted.
- 206
Partial Content
The server is sending only part of the file: the byte range the client asked for in its Range header.
- 207
Multi-Status
A WebDAV response that carries a separate status code for each of several resources, wrapped in an XML body.
- 208
Already Reported
Used inside a WebDAV 207 response to say a collection's members were already listed earlier, so they are not repeated.
- 226
IM Used
The server answered a GET with a delta: the result of instance manipulations applied to the current version of the resource.
3xx redirection
The client has to take another step, usually following a new URL.
- 300
Multiple Choices
The resource has more than one representation, such as different languages or formats, and the client needs to pick one.
- 301
Moved Permanently
The page has moved to a new URL for good. Browsers and search engines follow the Location header and update their links.
- 302
Found
The resource is temporarily at a different URL. Clients follow the Location header but keep using the original URL in future.
- 303
See Other
The server redirects the client to another URL that it must fetch with GET, typically after a form submission or other POST.
- 304
Not Modified
The cached copy is still valid, so the server sends no body and the client loads the resource from its own cache.
- 305
Use Proxydeprecated
A deprecated redirect that told the client to repeat the request through the proxy named in the Location header.
- 306
(Unused)unused
A reserved status code. It appeared in an early HTTP/1.1 draft as Switch Proxy and no longer has any meaning.
- 307
Temporary Redirect
The resource is temporarily at another URL, and the client must repeat the exact same request there, keeping the method and body.
- 308
Permanent Redirect
The resource has moved permanently to a new URL, and clients must keep the same method and body when following the redirect.
4xx client error
Something is wrong with the request, so the server won't handle it.
- 400
Bad Request
The server could not understand the request because something in it is malformed, like broken JSON, bad syntax or invalid headers.
- 401
Unauthorized
The request needs authentication. You are not logged in, or the credentials or token you sent are missing, invalid or expired.
- 402
Payment Required
Reserved for future use in the HTTP spec. Some APIs use it to say that payment, credit or a paid plan is needed.
- 403
Forbidden
The server understood the request but refuses to allow it. Logging in again will not help unless your account gets access.
- 404
Not Found
The server cannot find anything at this URL. The page may have moved or been deleted, or the link may have a typo.
- 405
Method Not Allowed
The URL exists but does not accept the HTTP method you used, like sending POST to an endpoint that only allows GET.
- 406
Not Acceptable
The server cannot produce a response in any format the client said it accepts in its Accept headers.
- 407
Proxy Authentication Required
A proxy between you and the website needs you to authenticate before it will forward your request.
- 408
Request Timeout
The server closed the connection because the client took too long to send the full request.
- 409
Conflict
The request conflicts with the current state of the resource, such as saving a version that someone else already changed.
- 410
Gone
The resource used to exist here but was deliberately removed and will not come back. There is no forwarding address.
- 411
Length Required
The server refuses the request because it has a body but no Content-Length header saying how big that body is.
- 412
Precondition Failed
A condition in the request headers, such as If-Match or If-Unmodified-Since, was false, so the server did not apply the request.
- 413
Content Too Large
The request body is bigger than the server is willing to accept, usually because an upload is over the size limit.
- 414
URI Too Long
The URL is longer than the server is willing to process, often because too much data was packed into the query string.
- 415
Unsupported Media Type
The server refuses the request body because its format, given by Content-Type or Content-Encoding, is not supported.
- 416
Range Not Satisfiable
The byte range asked for in the Range header is outside the file, so the server cannot send that part.
- 417
Expectation Failed
The server cannot meet the requirement in the request's Expect header, which is almost always Expect: 100-continue.
- 418
I'm a teapotjoke
An April Fools' joke code from the Hyper Text Coffee Pot Control Protocol: a teapot refusing to brew coffee.
- 421
Misdirected Request
The request reached a server that cannot answer for this hostname and scheme, often because an HTTP/2 connection was reused.
- 422
Unprocessable Content
The server understood the request and its format, but the data inside failed validation, like a missing field or bad email.
- 423
Locked
A WebDAV response saying the file or resource is locked, so the server will not change it until the lock is released.
- 424
Failed Dependency
A WebDAV response saying the request failed because another action it depended on failed first.
- 425
Too Early
The server will not process a request sent in TLS early data, because an attacker could replay it.
- 426
Upgrade Required
The server refuses to handle the request over the current protocol, and its Upgrade header names the protocol to switch to.
- 428
Precondition Required
The server requires a conditional request, such as one with If-Match, to stop clients from overwriting each other's changes.
- 429
Too Many Requests
You sent too many requests in a short time and hit a rate limit. Wait, then retry, ideally after the Retry-After time.
- 431
Request Header Fields Too Large
The server refuses the request because its headers are too big, usually because of too many or oversized cookies.
- 451
Unavailable For Legal Reasons
The server cannot show this resource because of a legal demand, such as a court order, government block or copyright claim.
5xx server error
The request looked fine, but the server failed to handle it.
- 500
Internal Server Error
Something went wrong on the server and it could not complete the request. It is a generic error and not your fault.
- 501
Not Implemented
The server does not support the functionality needed for the request, typically an HTTP method it does not recognise.
- 502
Bad Gateway
A server acting as a gateway or proxy got an invalid response, or no usable response, from the upstream server behind it.
- 503
Service Unavailable
The server cannot handle the request right now, usually because it is overloaded or down for maintenance. Try again later.
- 504
Gateway Timeout
A gateway or proxy waited too long for a response from the upstream server and gave up before the page was ready.
- 505
HTTP Version Not Supported
The server does not support, or refuses to use, the major HTTP version the client used for the request.
- 506
Variant Also Negotiates
A server configuration error in content negotiation: the chosen variant is itself set up to negotiate, creating a loop.
- 507
Insufficient Storage
The server cannot store what it needs to complete the request, typically because its disk or the user's quota is full.
- 508
Loop Detected
The server stopped a WebDAV request because it found an infinite loop, usually from bindings processed with Depth: infinity.
- 510
Not Extendeddeprecated
The request is missing an HTTP extension declaration that the server requires before it will process the request.
- 511
Network Authentication Required
You need to log in to the network before you can get online, typically on hotel, airport or cafe Wi-Fi with a captive portal.
No codes match that. Try a number like 404 or a word like "timeout".
Questions
What are HTTP status codes?
Every time a browser or app asks a server for something, the server answers with a three-digit status code. The first digit gives the class: 1xx means the request is still in progress, 2xx means it worked, 3xx means go somewhere else, 4xx means the request has a problem, and 5xx means the server failed.
What is the difference between 401 and 403?
401 Unauthorized means the server doesn't know who you are yet: log in or send valid credentials and try again. 403 Forbidden means the server knows who you are (or doesn't need to) and still refuses, so logging in again won't help.
What is the difference between 404 and 410?
404 Not Found says nothing about whether the page will come back. 410 Gone says it was removed on purpose and won't return, which tells search engines to drop it from their index sooner.
What is the difference between 502 and 504?
Both come from a gateway or proxy, such as nginx or Cloudflare, sitting in front of the real server. 502 Bad Gateway means it got an invalid response (or none) from that server. 504 Gateway Timeout means the server took too long to answer.
Which redirect should I use: 301, 302, 307 or 308?
Use 301 or 308 when a page has moved for good; search engines move ranking to the new URL. Use 302 or 307 for a temporary move. 307 and 308 also guarantee the request method stays the same, so a POST is resent as a POST.
Based on RFC 9110 and the RFCs linked on each code's page. Source: github.com/harindujayakody/http-status-codes· about this reference