Skip to main content
DEVELOPER PROTOCOL REFERENCE

HTTP Status Codes Directory

Quickly identify response codes, understand why errors happen, and find exact solutions for your API and web application development.

Free HTTP status mock endpoint

Reproduce any status from 200 to 599 to test retries, error screens, and timeouts. CORS enabled, add ?delay=2000 to simulate a slow server.

curl -i https://castov.com/api/mock/429

1xx1xx Informational

Request received, continuing process.

2xx2xx Success

The action was successfully received, understood, and accepted.

3xx3xx Redirection

Further action must be taken to complete the request.

4xx4xx Client Error

The request contains bad syntax or cannot be fulfilled.

400
Bad Request

The server cannot or will not process the request due to an apparent client error (e.g., malformed syntax, invalid framing, or deceptive routing).

401
Unauthorized

The client must authenticate itself to get the requested response. Similar to 403, but specific for missing or invalid credentials.

402
Payment Required

Reserved for future use; commonly used by SaaS APIs to signal exhausted credits, failed billing, or an expired plan.

403
Forbidden

The server understood the request but refuses to authorize it. Unlike 401, re-authenticating with the same credentials will make no difference.

404
Not Found

The server cannot find the requested resource. Links that lead to a 404 are often called broken or dead links.

405
Method Not Allowed

The request method is recognized by the server but is not supported by the target resource.

406
Not Acceptable

The server cannot produce a response matching the Accept headers sent by the client.

407
Proxy Authentication Required

The client must first authenticate itself with the proxy.

408
Request Timeout

The server timed out waiting for the client to send a complete request.

409
Conflict

Indicates that the request could not be processed because of conflict in the current state of the resource.

410
Gone

Indicates that the target resource is no longer available at the origin server and that this condition is likely to be permanent.

411
Length Required

The server refuses the request because it requires a Content-Length header.

412
Precondition Failed

One or more conditions in the request headers (If-Match, If-Unmodified-Since) evaluated to false.

413
Payload Too Large

The request entity is larger than limits defined by server configuration.

414
URI Too Long

The URI requested by the client is longer than the server is willing to interpret.

415
Unsupported Media Type

The origin server is refusing to service the request because the payload is in a format not supported by this method on the target resource.

416
Range Not Satisfiable

The Range header requested a portion of the file that lies outside the size of the target resource.

417
Expectation Failed

The server cannot meet the requirements of the Expect request header.

418
I'm a teapot

An April Fools' joke from RFC 2324 (Hyper Text Coffee Pot Control Protocol); the server refuses to brew coffee because it is a teapot.

421
Misdirected Request

The request was directed at a server that is not able to produce a response for this scheme and authority.

422
Unprocessable Content

The request was well-formed but was unable to be followed due to semantic errors.

423
Locked

WebDAV: the resource being accessed is locked.

425
Too Early

The server is unwilling to process a request that might be replayed (TLS 1.3 0-RTT early data).

426
Upgrade Required

The server refuses to perform the request using the current protocol but might after the client upgrades.

428
Precondition Required

The origin server requires the request to be conditional (If-Match) to prevent lost updates.

429
Too Many Requests

The user has sent too many requests in a given amount of time (rate limiting).

431
Request Header Fields Too Large

The server refuses the request because its header fields are too large.

451
Unavailable For Legal Reasons

The resource cannot be served due to legal demands such as government censorship or court orders.

499
Client Closed Request

Non-standard Nginx code logged when the client closes the connection before the server sends a response.

5xx5xx Server Error

The server failed to fulfill an apparently valid request.

500
Internal Server Error

A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.

501
Not Implemented

The server does not support the functionality required to fulfill the request.

502
Bad Gateway

The server, while acting as a gateway or proxy, received an invalid response from the inbound server it accessed.

503
Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.

504
Gateway Timeout

The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server.

505
HTTP Version Not Supported

The server does not support, or refuses to support, the major version of HTTP that was used in the request message.

507
Insufficient Storage

The server is unable to store the representation needed to complete the request.

508
Loop Detected

The server detected an infinite loop while processing the request.

511
Network Authentication Required

The client needs to authenticate to gain network access.

520
Web Server Returned an Unknown Error

Cloudflare-specific: the origin server returned an empty, unknown, or unexpected response.

521
Web Server Is Down

Cloudflare-specific: the origin server refused the connection from Cloudflare.

522
Connection Timed Out

Cloudflare-specific: the TCP handshake with the origin server timed out.

523
Origin Is Unreachable

Cloudflare-specific: Cloudflare could not reach the origin server at all.

524
A Timeout Occurred

Cloudflare-specific: a TCP connection was established but the origin did not reply within 100 seconds.

525
SSL Handshake Failed

Cloudflare-specific: the SSL/TLS handshake between Cloudflare and the origin failed.

526
Invalid SSL Certificate

Cloudflare-specific: Cloudflare could not validate the origin's SSL certificate in Full (strict) mode.

Frequently Asked Questions

What is an HTTP status code?
An HTTP status code is a three-digit integer returned by a web server to indicate the result of a client request. The first digit defines the class of response, ranging from 1xx (Informational) to 5xx (Server Error).
What is the difference between 401 Unauthorized and 403 Forbidden?
401 Unauthorized means authentication is missing or invalid (the server does not know who you are). 403 Forbidden means the server knows who you are, but you lack permission to access the resource.
Which HTTP status codes are best for SEO redirects?
Use 301 Moved Permanently for permanent URL migrations so search engines pass link equity to the new destination. Use 302 Found or 307 Temporary Redirect for short-term redirects.