Cloudflare error 1020: access denied
4 min read
Short answer
Error 1020 means a security feature the website owner configured blocked the request, and Cloudflare returns it with an HTTP 403. Nothing is wrong with your device. Cloudflare also documents that WAF custom rules and managed rules do not produce 1020; those return the WAF block response instead.
Researched explainer. Supporting documentation and research are linked in the article.
Error 1020 is a decision, not a fault. Somebody configured a rule, the request matched it, and Cloudflare returned the block. Cloudflare’s Error 1020 documentation describes it as a Cloudflare security feature configured by the website owner blocking the request, returned with an HTTP 403 status code.
That matters for a visitor, because there is nothing to repair on your own machine. More hosting explanations are in Websites & Hosting. The errors that genuinely do point at a broken connection to the server are 522 and 1016.
The documented cause is narrower than most people assume
Cloudflare gives one common cause: a security rule with a Block action matched the request, and that rule has no custom response configured. The examples it names are API Shield schema validation and JWT validation, both of which can block a request with a 1020.
The second half of that definition is doing real work. A rule with a custom response configured returns the custom response, so the visitor never sees 1020 at all. The code appears specifically when a block has nothing else to show.
WAF rules do not produce a 1020
This is the part worth getting right, because a great deal of advice says otherwise. Cloudflare’s page states plainly that requests blocked by WAF custom rules or WAF managed rules do not get a 1020 error, and that these requests get the WAF block response instead. It links to its own note on the different error page for blocked requests for the detail.
So an owner who sees 1020 in a visitor’s screenshot and goes straight to their WAF custom rules may be reading the wrong list. The same is true in reverse: a visitor blocked by a WAF custom rule will not be holding a 1020.
Nearby codes behave differently again:
| What matched the request | What the visitor sees |
|---|---|
| A Block rule with no custom response | Error 1020, with HTTP 403 |
| A WAF custom rule or WAF managed rule | The WAF block response |
| A Zone Lockdown rule, from a non-allowed IP | Error 1106 |
Cloudflare documents the 1106 case on its Zone Lockdown page, where a visitor from an unauthorised IP address receives access denied as 1106.
What the error gives a visitor to work with
Cloudflare’s instruction to anyone who is not the website owner is short: provide the owner with a screenshot of the 1020 message. That is not a brush-off. The message carries the Ray ID and a timestamp, and those are the two things that let an owner find the exact request among everything else that arrived that day.
If you have reached a site you are supposed to have access to, the useful action is to send that screenshot to whoever runs the site, with the time you tried. There is nothing to change in your browser.
How an owner finds the rule that fired
The documented sequence has three steps:
- Get a screenshot of the 1020 error from the person who hit it.
- Search the Security Events log, under Security > Analytics in the Events tab, for the Ray ID or client IP address from the message. Cloudflare says the event shows which security feature and rule blocked the request.
- Assess the cause and update the configuration of whatever blocked it.
An owner who would rather visitors saw an explanation than a code can replace
the page. Cloudflare documents a
custom error rule for 1020
using the expression (cf.response.1xxx_code eq 1020) with an HTML response.
Doing that does change what the visitor can report back, since the screenshot
will then show your page rather than the Cloudflare one.
Blocking by IP address has a documented side effect
If the block turns out to be intentional and too broad, the tool that created it matters. Cloudflare’s IP Access rules work on IP address, ASN or country, and it warns that allowing an IP or ASN bypasses configured custom rules, rate limiting rules, WAF Managed Rules and the deprecated firewall rules. Allowing a country bypasses custom rules, rate limiting rules and firewall rules, though not WAF Managed Rules.
An allow entry added to let one partner through is therefore wider than it looks. Cloudflare’s own recommendation is to use custom rules rather than IP Access rules for IP-based or geographic blocking, and it notes that blocking by country through IP Access rules is available only on Enterprise plans.
The 1020 documentation was last updated on 14 October 2026. Cloudflare changes which features return which codes over time, as the WAF note above shows, so check the current page before relying on a mapping.
Did this fix it?
We re-test the guides that stop working. Telling us is the fastest way to get one fixed.
Questions people also ask
- Did Cloudflare block my IP address?
- Cloudflare served the page, but the rule behind it belongs to the website owner rather than to Cloudflare. The error means a security feature that the owner configured matched your request. Only the owner can see which rule it was, which is why Cloudflare asks visitors to send them a screenshot.
- Is error 1020 caused by something on my computer?
- No. It is a decision made at Cloudflare about the request, returned with an HTTP 403 status code. It does not indicate a problem with your browser, your operating system or your device.
- Do WAF rules cause error 1020?
- No, and this is the common mistake. Cloudflare states that requests blocked by WAF custom rules or WAF managed rules do not get a 1020 error, because those return the WAF block response instead. A 1020 points at a different kind of rule, such as API Shield schema validation or JWT validation.
- What is error 1106 then?
- Error 1106 is the access denied message a visitor receives when a Cloudflare Zone Lockdown rule matches and their IP address is not on the allowed list. It is a separate code from 1020, documented on the Zone Lockdown page.
Krishna PokharelOffice and mobile tester, A2Z Skills
I test the Excel, Word and phone guides on A2Z Skills. That means reproducing the formula that returns an error or the setting that moved in the last Android release, on a real machine and a real handset, and writing down the version numbers it happened on.
Read next
- Cloudflare error 1016: origin DNS error
Error 1016 means Cloudflare cannot resolve your origin web server IP address. The usual cause is a missing A r…
- Cloudflare error 522: connection timed out
Error 522 means Cloudflare could not complete a connection to your origin in time: either no SYN+ACK arrived w…
Cloudflare SSL modes: Flexible, Full and Full (strict)For an HTTPS visitor, Flexible uses HTTP from Cloudflare to your origin. Full uses HTTPS there without validat…
DNS propagation explainedThere is no guaranteed completion time for a DNS change. The old record’s TTL sets ordinary cache expiry, but …