HTTP Status Codes

Look up every HTTP status code with its plain-English meaning and when to use it.

68 codes

100
Continue

The server got the request headers; the client should send the body.

Used with “Expect: 100-continue” before uploading a large body.

101
Switching Protocols

The server agrees to switch protocol, e.g. to WebSocket.

You see this when a WebSocket connection is established.

102
Processing

WebDAV: the request is received and still being processed.

Rarely used today.

103
Early Hints

Preliminary headers (usually Link preload hints) before the final response.

Lets browsers start loading CSS/fonts while the server is still working.

200
OK

The request succeeded.

The default success response for GET, and for POST/PUT when you return a body.

201
Created

A new resource was created.

Return it after a successful POST, with a Location header pointing to the new resource.

202
Accepted

The request was accepted but processing hasn’t finished.

Good for queued/background jobs. Return a URL where the client can check status.

203
Non-Authoritative Information

The response was modified by a proxy.

Uncommon.

204
No Content

Success, with no response body.

Typical for DELETE, or a PUT that returns nothing. Must not include a body.

205
Reset Content

Success; the client should reset the form/view.

Rare in APIs.

206
Partial Content

Only part of the resource is returned, as asked by a Range header.

Used for video streaming and resumable downloads.

207
Multi-Status

WebDAV: several status codes for several operations.

The body contains a status per sub-request.

208
Already Reported

WebDAV: members already listed earlier in the response.

Rare.

226
IM Used

Delta encoding result.

Very rare.

300
Multiple Choices

Several representations are available.

Rarely used; most servers pick one.

301
Moved Permanently

The resource has a new permanent URL.

Use for permanent URL changes; search engines transfer ranking. Browsers may change POST to GET — use 308 to keep the method.

302
Found

Temporary redirect.

Common after login. Browsers usually switch to GET; use 307 to keep the method.

303
See Other

Go to another URL with GET.

The classic “redirect after POST” to avoid resubmitting forms.

304
Not Modified

The cached copy is still valid.

Sent in reply to If-None-Match / If-Modified-Since. No body — saves bandwidth.

307
Temporary Redirect

Temporary redirect that keeps the method and body.

Use instead of 302 when a POST must stay a POST.

308
Permanent Redirect

Permanent redirect that keeps the method and body.

Use instead of 301 for APIs where the method matters.

400
Bad Request

The server can’t process the request because it is malformed.

Invalid JSON, missing fields or wrong types. Return details about what was wrong.

401
Unauthorized

Authentication is missing or invalid.

Means “not logged in”. Include a WWW-Authenticate header. For “logged in but not allowed” use 403.

402
Payment Required

Reserved for payment flows.

Some APIs use it when a plan limit or subscription is required.

403
Forbidden

The server understood but refuses to authorise it.

The user is known but lacks permission. Also used by WAFs and hotlink protection.

404
Not Found

No resource at this URL.

Also used to hide the existence of resources the user can’t access.

405
Method Not Allowed

The method isn’t supported for this URL.

e.g. POST to a read-only endpoint. Include an Allow header listing valid methods.

406
Not Acceptable

No representation matches the Accept headers.

Check the Accept header the client sends.

407
Proxy Authentication Required

Authenticate with the proxy first.

Seen on corporate networks.

408
Request Timeout

The server timed out waiting for the request.

Slow clients or networks; the client may retry.

409
Conflict

The request conflicts with the current state.

Duplicate records, edit conflicts or version mismatches.

410
Gone

The resource is permanently gone.

Stronger than 404 — tells search engines to drop the URL.

411
Length Required

A Content-Length header is required.

Send the body length or use chunked encoding where supported.

412
Precondition Failed

A condition like If-Match was false.

Used for optimistic locking with ETags.

413
Content Too Large

The request body is too large.

Raise limits (e.g. nginx client_max_body_size) or upload in chunks.

414
URI Too Long

The URL is longer than the server accepts.

Move large data from the query string into a POST body.

415
Unsupported Media Type

The body format isn’t supported.

Usually a missing or wrong Content-Type (e.g. sending JSON without application/json).

416
Range Not Satisfiable

The requested Range can’t be served.

The range is outside the file size.

417
Expectation Failed

The Expect header can’t be met.

Rare.

418
I'm a teapot

An April Fools’ joke from RFC 2324.

Sometimes used for joke or bot-blocking responses.

421
Misdirected Request

The request went to a server that can’t answer for this host.

Seen with HTTP/2 connection reuse and TLS certificates.

422
Unprocessable Content

Well-formed but semantically invalid.

Popular for validation errors (Laravel, Rails, FastAPI).

423
Locked

WebDAV: the resource is locked.

Rare outside WebDAV.

424
Failed Dependency

WebDAV: a previous request failed.

Rare.

425
Too Early

The server won’t risk processing a replayable early-data request.

Related to TLS 1.3 0-RTT.

426
Upgrade Required

Switch to a different protocol.

e.g. the server requires HTTPS or a newer HTTP version.

428
Precondition Required

The request must be conditional.

Forces clients to send If-Match to avoid lost updates.

429
Too Many Requests

Rate limit exceeded.

Respect the Retry-After header and back off exponentially.

431
Request Header Fields Too Large

Headers are too large.

Often caused by huge cookies — clear them.

444
No Response (nginx)

Unofficial: nginx closed the connection without replying.

Used to drop malicious requests.

451
Unavailable For Legal Reasons

Blocked for legal reasons.

e.g. censorship or a court order.

499
Client Closed Request (nginx)

Unofficial: the client disconnected before the server replied.

Users navigated away or a client timeout fired.

500
Internal Server Error

Generic server-side failure.

An unhandled exception. Check the server logs.

501
Not Implemented

The server doesn’t support this functionality.

An unknown method or a not-yet-built feature.

502
Bad Gateway

A proxy got an invalid response from the upstream server.

The app behind nginx/a load balancer crashed or is restarting.

503
Service Unavailable

The server is overloaded or down for maintenance.

Temporary. Send Retry-After. Search engines treat it as temporary.

504
Gateway Timeout

A proxy timed out waiting for the upstream server.

Slow queries or external calls. Increase timeouts or make the work asynchronous.

505
HTTP Version Not Supported

The HTTP version isn’t supported.

Rare.

506
Variant Also Negotiates

Content negotiation misconfiguration.

Rare.

507
Insufficient Storage

WebDAV: the server is out of storage.

Disk full.

508
Loop Detected

WebDAV: an infinite loop was detected.

Rare.

510
Not Extended

Further extensions are required.

Obsolete.

511
Network Authentication Required

Log in to the network first.

Captive portals in hotels and airports.

520
Unknown Error (Cloudflare)

Unofficial: the origin returned something unexpected.

Check origin server logs.

521
Web Server Is Down (Cloudflare)

Unofficial: the origin refused the connection.

The origin is down or blocks Cloudflare IPs.

522
Connection Timed Out (Cloudflare)

Unofficial: Cloudflare couldn’t reach the origin in time.

Firewall or overloaded origin.

523
Origin Is Unreachable (Cloudflare)

Unofficial: no route to the origin.

DNS or network issues.

524
A Timeout Occurred (Cloudflare)

Unofficial: the origin took too long to respond.

Requests over ~100 s on most plans.