DevTool Desk

HTTP Status Codes

Showing 70 of 70 status codes

1xx Informational

100Continue

The server has received the request headers and the client should go ahead and send the body.

Used with the Expect: 100-continue header so a client can check the server will accept a large upload before sending it. HTTP libraries handle it for you.

101Switching Protocols

The server is switching to the protocol the client asked for in the Upgrade header.

Most commonly seen when a connection is upgraded to WebSocket. If a WebSocket connection fails, check that your proxy passes the Upgrade and Connection headers through.

102Processing

(WebDAV) The server has accepted the request and is still working on it.

Deprecated and almost never seen. It only existed to stop WebDAV clients timing out on slow operations.

103Early Hints

The server sends preliminary Link headers so the browser can start preloading resources before the final response is ready.

Speeds up page loads by preloading CSS and JavaScript while the server is still building the page. Supported by modern browsers and CDNs.

2xx Success

200OK

The request succeeded and the response contains the result.

The default success code. For GET the body is the resource; for POST it's the result of the action. Consider 201 or 204 when they describe the outcome more precisely.

201Created

The request succeeded and a new resource was created.

Return it from a POST (or PUT) that creates something, with a Location header pointing at the new resource.

202Accepted

The request was accepted for processing, but processing hasn't finished.

Use it for asynchronous work such as queued jobs, and give the client a way to check progress, like a status URL. It doesn't promise the work will succeed.

204No Content

The request succeeded and there is no body to return.

Common for DELETE, and for PUT or PATCH where the client already has the data. The response must not include a body.

205Reset Content

The request succeeded, and the client should reset the view that sent it, for example by clearing a form.

Rare. The response must not include a body.

206Partial Content

The server is returning only part of the resource, as requested by a Range header.

Powers resumable downloads and video seeking. If you see it unexpectedly, a client or CDN is making range requests.

207Multi-Status

(WebDAV) The body contains several separate status codes, one for each of multiple operations.

Seen in WebDAV and some batch APIs. Check each individual status in the body rather than relying on the overall 207.

208Already Reported

(WebDAV) Members of a binding were already listed earlier in the response and aren't repeated.

WebDAV-only and almost never seen.

226IM Used

The server fulfilled a GET request using instance manipulations (delta encoding) applied to the current instance.

Very rare. It's part of an HTTP delta-encoding extension that saw little adoption.

3xx Redirection

300Multiple Choices

The resource has several representations and the client should pick one.

Rarely used because there's no standard way to make the choice. Prefer content negotiation or an explicit redirect.

301Moved Permanently

The resource has permanently moved to the URL in the Location header.

Use it for permanent URL changes. Browsers and search engines cache it and pass ranking signals to the new URL. Clients may change POST to GET when following it; use 308 to keep the method.

302Found

The resource is temporarily at a different URL, given in the Location header.

Use it for temporary redirects. Clients may change POST to GET; use 307 if the method must be preserved. Search engines keep the original URL indexed.

303See Other

The response is at another URL, and the client should fetch it with GET.

The standard way to redirect after a POST so refreshing the page doesn't resubmit the form (Post/Redirect/Get).

304Not Modified

The cached copy is still valid, so no body is sent.

The response to a conditional request (If-None-Match or If-Modified-Since) when nothing has changed. It saves bandwidth and is not an error.

305Use Proxy

The requested resource must be accessed through a proxy.

Deprecated for security reasons and ignored by browsers. Don't use it.

307Temporary Redirect

Temporary redirect to the Location URL, and the client must repeat the same method and body.

Like 302, but it guarantees a POST stays a POST. The right choice for temporary redirects of API calls.

308Permanent Redirect

Permanent redirect to the Location URL, and the client must repeat the same method and body.

Like 301, but it guarantees the method is preserved. The right choice for permanently moving an API endpoint.

4xx Client error

400Bad Request

The server can't process the request because it looks malformed.

Common cause
Malformed syntax: invalid JSON, a bad URL, missing required fields, or oversized cookies and headers.
How to fix
Check the URL, headers and body syntax, clear the site's cookies, and read the response body, which usually names the bad field.
Full 400 guide: causes, fixes and FAQ

401Unauthorized

The request lacks valid authentication credentials. Despite the name, this is about authentication, not permission.

Common cause
No credentials were sent, or the token or API key is missing, wrong, or expired.
How to fix
Send a valid Authorization header (for example Bearer <token>), or log in again and refresh expired tokens.
Full 401 guide: causes, fixes and FAQ

402Payment Required

Reserved for digital payment systems, with no standard usage.

Common cause
Some APIs use it when a plan is unpaid or a quota is exhausted.
How to fix
Check billing and usage limits with the provider.

403Forbidden

The server understood the request but refuses to authorize it.

Common cause
You're identified but not allowed: missing permission, an IP or WAF block, a missing CSRF token, or wrong file permissions.
How to fix
Check the account's roles, allow-lists and CSRF token; on a web server, check file permissions and that an index file exists.
Full 403 guide: causes, fixes and FAQ

404Not Found

The server can't find the requested resource.

Common cause
A wrong URL, a page that was deleted or moved, or a route or file that wasn't deployed.
How to fix
Check the URL's spelling and case, confirm the route or file exists after deploy, and add a redirect if it moved.
Full 404 guide: causes, fixes and FAQ

405Method Not Allowed

The HTTP method isn't supported for this resource.

Common cause
The endpoint doesn't accept that method, for example a POST sent to a GET-only route.
How to fix
Use a method listed in the response's Allow header and check the route handler implements it.

406Not Acceptable

The server can't produce a response matching the client's Accept headers.

Common cause
The Accept, Accept-Language or Accept-Encoding header asks for a format the server can't provide.
How to fix
Loosen the Accept header (for example */*) or request a format the API supports.

407Proxy Authentication Required

Like 401, but the client must first authenticate with a proxy.

Common cause
A proxy between you and the server requires credentials.
How to fix
Send a Proxy-Authorization header or configure the proxy username and password.

408Request Timeout

The server timed out waiting for the client to finish sending the request.

Common cause
A slow or dropped connection, often during a large upload.
How to fix
Retry, check the network, and raise the server or proxy request timeout for big uploads.

409Conflict

The request conflicts with the current state of the resource.

Common cause
An edit conflict, a duplicate record, or a version mismatch.
How to fix
Re-fetch the latest state, resolve the conflict, and retry.

410Gone

The resource used to exist and has been permanently removed.

Common cause
The resource was removed on purpose. Search engines drop 410 pages faster than 404 pages.
How to fix
Stop requesting it and remove links to it; restore it or add a redirect if it should still exist.

411Length Required

The server requires a Content-Length header.

Common cause
The request has a body but no Content-Length, for example a chunked upload the server won't accept.
How to fix
Send a Content-Length header, or buffer the body so its length is known.

412Precondition Failed

A condition in the request headers (such as If-Match or If-Unmodified-Since) evaluated to false.

Common cause
The resource changed since you last read it, so your If-Match or If-Unmodified-Since check failed.
How to fix
Re-fetch the resource to get the current ETag, then retry.

413Content Too Large

The request body is larger than the server allows. (Formerly called "Payload Too Large".)

Common cause
The upload or body exceeds the server's size limit.
How to fix
Send less data, or raise the limit (client_max_body_size in nginx, or your framework's or platform's body size setting).

414URI Too Long

The URL is longer than the server is willing to process.

Common cause
A query string that's too long, often from a form submitted with GET.
How to fix
Move the data into a POST body or shorten the query.

415Unsupported Media Type

The server doesn't accept the request's Content-Type.

Common cause
The Content-Type header is missing, unsupported, or doesn't match the body.
How to fix
Set the right Content-Type, for example application/json for a JSON body.

416Range Not Satisfiable

The Range header asked for a part of the resource that doesn't exist.

Common cause
The requested byte range is outside the file's size, often a stale resumed download.
How to fix
Restart the download without the Range header.

417Expectation Failed

The server can't meet the requirements of the Expect header.

Common cause
A proxy or server refuses the Expect: 100-continue header.
How to fix
Remove the Expect header from the request.

418I'm a teapot

A joke status from an April Fools' RFC (RFC 2324): the server is a teapot and refuses to brew coffee.

Common cause
An easter egg, or a site rejecting automated traffic.
How to fix
Nothing to fix. If a real site returns it to you, it's likely blocking bots.

421Misdirected Request

The request was sent to a server that can't produce a response for that host.

Common cause
HTTP/2 connection reuse across hostnames, or misconfigured TLS/SNI on a shared server.
How to fix
Check virtual host and SNI configuration, and that the certificate covers every hostname served.

422Unprocessable Content

The request is well-formed, but its content is semantically invalid.

Common cause
The body is valid JSON but a field fails validation, such as a bad or missing value.
How to fix
Read the response body for the field errors and correct those values.

423Locked

(WebDAV) The resource being accessed is locked.

Common cause
Another user or process holds a lock on the resource.
How to fix
Wait for the lock to release, or unlock the resource.

424Failed Dependency

(WebDAV) The request failed because an earlier request it depended on failed.

Common cause
A previous request that this one relies on didn't succeed.
How to fix
Fix the earlier failure first, then retry.

425Too Early

The server won't process a request that might be replayed.

Common cause
A request sent as TLS 1.3 early data (0-RTT) could be replayed, so the server refuses it.
How to fix
Retry once the TLS handshake has completed.

426Upgrade Required

The server refuses the request using the current protocol and requires the client to upgrade.

Common cause
The server requires a newer protocol, such as TLS.
How to fix
Retry using the protocol named in the response's Upgrade header.

428Precondition Required

The server requires the request to be conditional.

Common cause
The server insists on conditional requests to prevent lost updates.
How to fix
Add an If-Match header containing the resource's current ETag.

429Too Many Requests

The client has sent too many requests in a given time (rate limiting).

Common cause
You hit a rate limit by sending too many requests in a short period.
How to fix
Wait for the Retry-After delay, then retry with exponential backoff; cache responses or batch requests to send fewer.
Full 429 guide: causes, fixes and FAQ

431Request Header Fields Too Large

The request headers, or one header, are too large.

Common cause
Usually oversized cookies or a very long custom header.
How to fix
Clear the site's cookies and trim headers; raise the server's header size limit if needed.

451Unavailable For Legal Reasons

The resource is blocked for legal reasons, such as a court order or censorship.

Common cause
A legal demand requires the content to be withheld. The number is a nod to Fahrenheit 451.
How to fix
Nothing on the client can fix it; the response should say who imposed the block.

5xx Server error

500Internal Server Error

The server hit an unexpected condition and couldn't complete the request.

Common cause
An unhandled exception, bad configuration, or a failed dependency on the server.
How to fix
Read the server or application logs for the stack trace and check recent deploys and config changes; a visitor can only retry later.
Full 500 guide: causes, fixes and FAQ

501Not Implemented

The server doesn't support the functionality required to fulfil the request.

Common cause
The server doesn't recognise the method or feature at all. Compare 405, where the method is known but not allowed.
How to fix
Use a supported method, or implement the missing feature on the server.

502Bad Gateway

A gateway or proxy received an invalid response from the upstream server.

Common cause
The backend app crashed, isn't running, or returned garbage to the proxy (nginx, a load balancer, or a CDN).
How to fix
Check the backend is running and listening on the port the proxy expects, then read its logs and the proxy's error log.
Full 502 guide: causes, fixes and FAQ

503Service Unavailable

The server can't handle the request right now, typically because it's overloaded or down for maintenance.

Common cause
The server is overloaded, still starting up, or in planned maintenance.
How to fix
Wait and retry (respect Retry-After); check capacity, restarts and deploys, and scale up if it's load.
Full 503 guide: causes, fixes and FAQ

504Gateway Timeout

A gateway or proxy didn't get a response from the upstream server in time.

Common cause
The backend is too slow: a slow database query or external API call outlasts the proxy's timeout.
How to fix
Find and optimise the slow query or call, move long work to a background job, and raise the proxy timeout if needed.
Full 504 guide: causes, fixes and FAQ

505HTTP Version Not Supported

The server doesn't support the HTTP version used in the request.

Common cause
A very old or unusual client using an HTTP version the server rejects.
How to fix
Use HTTP/1.1 or newer.

506Variant Also Negotiates

A server misconfiguration in transparent content negotiation.

Common cause
A circular reference in the server's content negotiation setup.
How to fix
Fix the negotiation configuration so a variant doesn't itself negotiate.

507Insufficient Storage

(WebDAV) The server can't store what's needed to complete the request.

Common cause
The server is out of disk space or quota.
How to fix
Free up disk space or raise the storage quota.

508Loop Detected

(WebDAV) The server detected an infinite loop while processing the request.

Common cause
A circular reference in the resource or request.
How to fix
Break the loop in the resource structure.

510Not Extended

The server requires further extensions to the request in order to fulfil it.

Common cause
The request lacks an extension the server requires. Obsolete and rarely seen.
How to fix
Add the extension the server asks for, or use a different approach.

511Network Authentication Required

The client must authenticate to gain network access.

Common cause
A captive portal, such as hotel or airport Wi-Fi, is blocking traffic until you sign in.
How to fix
Open a browser and sign in to the network's login page.

Unofficial status codes

Not part of the HTTP standard, but common enough (nginx, Cloudflare) that you'll run into them.

499Client Closed Request

(nginx) The client closed the connection before the server sent a response.

Common cause
The client timed out or the user navigated away. It appears in nginx logs, and can signal a slow backend.
How to fix
If it's frequent, speed up the backend or raise the client timeout.

520Web Server Returned an Unknown Error

(Cloudflare) The origin server returned an empty, unknown, or unexpected response to Cloudflare.

Common cause
The origin crashed, or sent oversized or malformed response headers.
How to fix
Check the origin's logs for crashes and confirm response headers are valid and not oversized.

521Web Server Is Down

(Cloudflare) The origin server refused Cloudflare's connection.

Common cause
The origin server is offline, or its firewall blocks Cloudflare.
How to fix
Start the origin server and allow Cloudflare's IP ranges through its firewall.

522Connection Timed Out

(Cloudflare) Cloudflare couldn't complete a TCP connection to the origin server in time.

Common cause
A connection timeout: the origin is offline or overloaded, or a firewall is dropping Cloudflare's traffic.
How to fix
Check the origin is reachable and that Cloudflare's IP ranges aren't blocked or rate-limited.

523Origin Is Unreachable

(Cloudflare) Cloudflare can't reach the origin server, often because of a routing or DNS problem.

Common cause
The DNS record points to the wrong IP, or there's no route to the origin.
How to fix
Check the DNS records point to the correct origin IP and that the network route to it is up.

524A Timeout Occurred

(Cloudflare) Cloudflare connected to the origin, but it didn't reply with an HTTP response in time.

Common cause
The origin is taking too long (Cloudflare waits about 100 seconds by default).
How to fix
Speed up the slow request or move it to a background job.

525SSL Handshake Failed

(Cloudflare) Cloudflare couldn't establish an SSL/TLS handshake with the origin server.

Common cause
The origin's SSL setup is broken or doesn't support Cloudflare's cipher suites or TLS versions.
How to fix
Check the origin's SSL configuration and supported ciphers and TLS versions.

526Invalid SSL Certificate

(Cloudflare) Cloudflare couldn't validate the origin server's SSL certificate.

Common cause
The origin's certificate is expired, self-signed, or has the wrong hostname.
How to fix
Install a valid certificate, or use a Cloudflare Origin CA certificate.

Every HTTP status code in one searchable list, from 100 Continue to 511 Network Authentication Required, plus the unofficial nginx and Cloudflare codes (like 499 and 522) you'll meet in real logs. Each error code has a one-line common cause and a one-line fix, and every code has its own link, so you can share /tools/http-status-codes#404 directly. The most-searched errors (400, 401, 403, 404, 429, 500, 502, 503 and 504) also have a full guide with causes, step-by-step fixes and FAQs.

Frequently asked questions

What do the different classes of HTTP status codes mean?

The first digit tells you the class. 1xx codes are informational, 2xx mean success, 3xx are redirects, 4xx mean the client made a mistake (bad request, not found, not authorised), and 5xx mean the server failed to handle a valid request.

What's the difference between 401 and 403?

401 Unauthorized means you haven't authenticated: the server doesn't know who you are, so log in or send valid credentials. 403 Forbidden means the server knows who you are but you're not allowed to access the resource, so logging in again won't help.

What's the difference between 301 and 302?

301 is a permanent redirect: browsers and search engines cache it and treat the new URL as the real one. 302 is temporary: the original URL stays the canonical one. If the redirect must keep the request method (for example POST), use 308 (permanent) or 307 (temporary).

What's the difference between 502, 503 and 504?

All three are server-side. 502 Bad Gateway: a proxy got an invalid response from the upstream server. 503 Service Unavailable: the server is overloaded or in maintenance, usually temporarily. 504 Gateway Timeout: the proxy gave up waiting for the upstream server to respond.

Which status code should my API return?

Use 200 for successful reads, 201 for created resources, 204 for success with no body, 400 or 422 for invalid input, 401 or 403 for auth problems, 404 for missing resources, 429 for rate limiting, and 500 for unexpected server errors. Precise codes make an API much easier to debug.

Where do the unofficial codes like 499 and 522 come from?

They're defined by specific software rather than the HTTP standard. 499 is nginx's code for a client that closed the connection early, and the 52x series (520 to 526) are Cloudflare's codes for problems reaching your origin server.