521 Web Server Is Down

Cloudflare: the origin refused the connection.

Status code
521
Reason phrase
Web Server Is Down
Class
5xx Server errors
Source
Cloudflare (non-standard)

What does 521 Web Server Is Down mean?

Cloudflare-specific: the origin server refused the connection — it is down or blocks Cloudflare IPs.

Common causes

How to fix it

521 and webhooks

Retried by providers.

Test how your client handles 521

In the webhook tester you can add a response rule that answers 521 — useful to check retries, error handling and alerts before production.

FAQ

What does HTTP 521 mean?

Cloudflare: the origin refused the connection. Cloudflare-specific: the origin server refused the connection — it is down or blocks Cloudflare IPs.

Is 521 an error?

Yes — a server error: the request may succeed if retried later.

Other 5xx codes

500 Internal Server Error · 501 Not Implemented · 502 Bad Gateway · 503 Service Unavailable · 504 Gateway Timeout · 505 HTTP Version Not Supported · 507 Insufficient Storage · 508 Loop Detected · 511 Network Authentication Required · 520 Web Server Returned an Unknown Error · 522 Connection Timed Out · 523 Origin Is Unreachable · 524 A Timeout Occurred · 525 SSL Handshake Failed · 526 Invalid SSL Certificate

← 520   All status codes   522 →

About HTTP 521

521 Web Server Is Down is part of the 5xx class: server errors, where the request may be fine but the server failed.

A 521 is usually safe to retry with exponential backoff; most payment providers retry webhooks that got a 521.

When debugging, compare the 521 with server logs at the same timestamp and check proxies or CDNs in between — they can generate a 521 before your app is reached.