Cloudflare · Web Server Returned an Unknown Error

Cloudflare Error Code 520

The origin returned an empty, unknown or malformed response.

errorLast verified 2026-11-17Cloudflare 5xx errors: Error 520
Quick answer

The origin returned an empty, unknown or malformed response.

Code520
ProductCloudflare
Company / originCloudflare · United States
CategoryCloud & DevOps
Platform / versionsCloudflare edge and origin · Current edge and origin
Severityerror
Official sourceCloudflare 5xx errors: Error 520 ↗
Last verified2026-11-17

What does Cloudflare error 520 mean?

Cloudflare Error 520 means the origin did not return a response Cloudflare could parse. Typical causes are an origin crash, a firewall blocking Cloudflare IPs, malformed headers or an origin that speaks HTTP/2 incorrectly.

Common causes

  • The origin process crashed or returned an empty response.
  • A firewall, security plugin or origin ACL blocks Cloudflare IP ranges.
  • Response headers exceed 128 KB or the origin's HTTP/2 support is misconfigured.

How to fix it

  1. Step 1

    Check origin error logs for crashes, empty responses and malformed headers.

  2. Step 2

    Allow Cloudflare IP ranges at the origin firewall and security layer.

  3. Step 3

    If the origin advertises HTTP/2 through ALPN but does not support it, disable HTTP/2 to Origin or fix the server configuration.

When to escalate

Before you escalate: If the same Cloudflare 5xx code persists after checking the origin logs and temporarily pausing Cloudflare, contact the hosting provider with the exact code, URL, timestamp and cf-ray, plus HAR files with Cloudflare enabled and paused.

Related codes

CodeNameWhat it means
500Internal Server ErrorThe origin web server could not complete the request.
522Connection Timed OutCloudflare could not open a TCP connection to the origin in time.

Source & verification

This page was checked against Cloudflare 5xx errors: Error 520 on 2026-11-17. The code, product, and platform fields are kept separate from the explanation so corrections can be made without changing the URL.

Open Error Codes is independent and not affiliated with Cloudflare. Always confirm destructive or security-sensitive steps with the official documentation.