Troubleshooting guide
Cloudflare error 1020: Access denied
A 1020 means one of the site's Cloudflare firewall rules blocked this request on purpose. The origin server never saw it.
3 min read10 sectionsUpdated
On this page
Common causes
- A country or ASN block catching legitimate users or VPNs.
- User-agent rules that block
curl, scripts or monitoring tools. - Rate-based rules tripped by shared corporate IPs.
- Path rules written too broadly, such as blocking anything containing
/admin. - Changed browser privacy settings that make a request look like a bot.
Diagnose it
Get the Ray ID from the error page or cf-ray header. In the Cloudflare dashboard, open Security, then Events, and search for that ID. It names the rule, the action, and the fields that matched.
# See the block and the Ray ID
curl -si https://example.com/ | grep -iE '^(HTTP|cf-ray|server)'
# Same request with a browser user agent: does the rule target the UA?
curl -s -o /dev/null -w "%{http_code}\n" -A 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36' https://example.com/Fixes
As a visitor: turn off your VPN, try another browser, and send the Ray ID to the site owner.
As a site owner: edit the rule rather than disabling the WAF. Add a narrow exception, use a Managed Challenge instead of Block where people might be wrongly matched, and allow known API clients with a secret header or by token. Review Security Events after every rule change to see who is newly blocked.
Catch it automatically
A firewall change can take down your site for a whole country while your dashboard stays green. Run uptime checks from multiple regions and watch for a region-specific failure. Allow your monitor explicitly, or it will alert every time, and also add a rule that still tests the real path through the WAF.
Why am I blocked but my friend is not?
The rule probably matches something specific to you, such as IP address, country, VPN or browser.
Can a visitor fix 1020?
Only by changing what the rule matches, such as turning off a VPN. Otherwise the site owner must change the rule.
Does the origin log blocked requests?
No. Cloudflare stops them first, so use Security Events.
Check it now, free
- Is Cloudflare down? Live status: checked every few minutes, with outage history.
- Website down checker: Is it down for everyone or just me? Check any site now.
Related reading
- CORS error: blocked by CORS policy: Understand and fix CORS errors: what Access-Control-Allow-Origin does, preflight OPTIONS requests, credentials and server config examples.
- Cloudflare error 523: origin is unreachable: Fix Cloudflare error 523 Origin is Unreachable: wrong DNS IPs, routing problems at the host and firewalls, with tests that confirm where traffic stops.
- Cloudflare error 1016 "Origin DNS error": how to fix it: Fix Cloudflare error 1016 Origin DNS error: CNAME records pointing to names that do not resolve, deleted origins and load balancer pools, with checks.
- Cloudflare error 522: connection timed out: Fix Cloudflare error 522 "Connection timed out": the origin did not complete the TCP connection in time. Overloaded servers, dropped packets and wrong DNS.
- Cloudflare error 524: a timeout occurred: Fix Cloudflare error 524: the origin accepted the connection but sent no HTTP response within 100 seconds. Find the slow request and move long work off it.
- Cloudflare error 525: SSL handshake failed: Fix Cloudflare error 525 SSL handshake failed: origin with no certificate, disabled SNI, cipher mismatches and Full mode, with openssl tests against the origin.
Watch your own site and services with VitalRix
Uptime checks, APM, logs, real-user monitoring, alerts and status pages in one place. Every product has a free tier and no credit card is needed.