Error 520
This error occurs when the origin server returns an empty, unknown, or unexpected response to Cloudflare.
This error is often triggered by:
- Origin server crashes or misconfigurations.
- Firewalls or security plugins blocking Cloudflare IPs ↗ at your origin.
- Headers exceeding 16 KB (often due to excessive cookies).
- Empty or malformed responses lacking an HTTP status code or response body.
- Missing response headers or origin web server not returning proper HTTP error responses ↗.
- Incorrect HTTP/2 configuration at the origin server.
-
Contact your hosting provider or site administrator and share the necessary error details to assist with troubleshooting. Request a review of your origin web server error logs for crashes and check for common causes mentioned in the previous section.
-
If HTTP/2 is enabled at your origin server, ensure it is correctly set up. Cloudflare connects to servers who announce support of HTTP/2 connections via ALPN ↗. If the origin web server accepts the HTTP/2 connection but then does not respect or support the protocol, an HTTP
520
error will be returned. You can disable the HTTP/2 to Origin in Speed > Optimization > Protocol Optimization on the Cloudflare dashboard. -
If
520
errors continue after contacting your hosting provider or site administrator, provide the following information to Cloudflare Support:- Full URL(s) of the resource requested when the error occurred.
- Cloudflare cf-ray from the
520
error message. - Output from
http://<YOUR_DOMAIN>/cdn-cgi/trace
. - Two HAR files:
- One with Cloudflare enabled on your website.
- Another with Cloudflare temporarily disabled.
Was this helpful?
- Resources
- API
- New to Cloudflare?
- Products
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark