What Is Cloudflare Error 1020? How to Fix Access Denied

Published:

19 minute read

Acar Diveroli
Written by: Acar Diveroli
A large 1020 above Access Denied; beside it a list of owner rules where one row reads Block and a blue Ray ID tag marks it

You click a link in an order confirmation email, the shop's tracking page starts to load, and then a plain white page appears instead: "Access denied", "Error 1020" and a Ray ID at the bottom. The same shop opened fine on your phone an hour ago. Or you are a developer, and the nightly job that checks your own store's API suddenly logs 403 with a body that mentions 1020. In both cases the page gives no reason, and it is easy to assume the site is down or that your account was banned.

This post explains what Error 1020 means, who decided to block the request and why Cloudflare's own documentation now ties the code to a narrower set of rules than older guides say. It then splits the fixes by reader: the visitor who sees the page, the site owner who has to find the rule, and the developer whose script or API client gets the response. It closes with the one case where the IP address of a proxy is the cause, a comparison table with the related codes and a decision guide.

What is Cloudflare Error 1020?

Error 1020 is the page Cloudflare shows when a security feature that the website owner configured blocks a request. Cloudflare sits in front of many sites as a reverse proxy: your browser talks to Cloudflare's network first, and Cloudflare forwards the request to the site's own server only if it passes the owner's rules. When a rule says "block", the request never reaches the site, and you get the 1020 page instead.

Cloudflare's Error 1020 documentation describes the cause in one line: a security rule with a Block action matched the request, and the rule has no custom response configured. The same page says the response carries HTTP status 403. So 1020 is not a separate HTTP code. The 403 travels in the status line, and the number 1020 appears in the body of the page as Cloudflare's own label for the kind of block.

Two things follow. The decision was made by the site owner, not by Cloudflare and not by your internet provider. And the block is about this request and the properties it had, not about you as a person or about your account on the site.

What does the Access denied page show?

The page is short: a heading that reads "Access denied", the code 1020, the name of the site you tried to open and a Ray ID near the bottom. Some site owners replace the design with their own branded page, but the code and the Ray ID usually stay.

The Ray ID is the part that matters. Cloudflare gives an identifier to every request that passes through its network, and the site owner can search their security log for it. That search shows the rule that fired, the IP address it saw and the time. Without the Ray ID, the owner has to guess which of thousands of blocked requests was yours.

What the page does not show is the reason. It never says "your country is blocked" or "your browser looks like a bot". That is on purpose: telling every blocked visitor which rule caught them would also tell an attacker how to change the request.

Which rules cause Error 1020 today?

On Cloudflare's current platform, 1020 comes from a security rule with a Block action and no custom response. Cloudflare's own examples are API Shield checks such as schema validation and JWT validation, which reject API calls that do not match the shape or the token the owner expects.

This is narrower than most guides online say, and the reason is a product change. Cloudflare used to offer "firewall rules", and a request blocked by one of them got the 1020 page. Those rules were replaced by WAF custom rules; Cloudflare says the old Firewall Rules API has not been supported since 15 June 2025. A request blocked by a WAF custom rule or a managed rule now gets a different page, the WAF block response, which most people know by its heading "Sorry, you have been blocked". It also returns 403.

For a visitor the difference is small: both pages mean a rule written or switched on by the site owner stopped you, and the steps below apply to both. For a site owner it tells you where to look. If your visitors report "1020" rather than "Sorry, you have been blocked", check the security features that block without a custom response, not only your custom rules.

What can a blocking rule look at?

A Cloudflare rule is an expression over the properties of a request plus an action. If you want the wider picture of how this layer works, our post What Is a WAF (Web Application Firewall)? covers it. The steps for a single request look like this:

  1. The request reaches Cloudflare's edge. Your browser or script connects to the nearest Cloudflare data center, not to the site's server.
  2. Cloudflare reads the request's properties. The source IP address, the country and the network (ASN) that address belongs to, the User-Agent header, the requested path, the HTTP method, the Referer header and a threat score.
  3. The owner's rules run in order. Each rule compares some of those properties with values the owner chose, for example "path starts with /admin and country is not the one where our team works".
  4. A Block action ends the evaluation. Block is a terminating action, so later rules do not run for that request.
  5. Cloudflare sends the block page with status 403. The event is written to the owner's security log together with the rule and the Ray ID.

In practice, the rules that catch ordinary visitors are the broad ones: a whole country, a whole network, an empty or unusual browser identity, or every request to a path such as a login or admin page.

How does Error 1020 differ from 1015, 1010, 1006 and a plain 403?

These codes all mean "access refused", but they point to different rules and different fixes. Cloudflare lists them on its 1xxx errors page, and every one except 1015 returns status 403:

CodeWhat the page saysWhat triggered itDoes waiting help?
1020Access deniedA security rule set by the ownerNo, the rule stays
1015You are being rate limitedToo many requests in a short timeYes, it is temporary
1010Banned based on browser's signatureThe way your browser identifies itselfNo
1006, 1007, 1008Your IP address has been bannedA ban on your IP addressNo
403 without a codeDepends on the siteThe site's server or a WAF block pageRarely

The practical split is between 1015 and the rest. A rate limit lifts by itself when its timer runs out, which is why the advice for it is to stop refreshing; we cover that case in What Is Error 1015?. A 1020 does not expire. The same request will be blocked tomorrow unless something about the request changes or the owner changes the rule.

Why do I get Error 1020 when I did nothing wrong?

Most visitors who see 1020 were not doing anything harmful; the rule simply matched a property they share with traffic the owner wanted to stop. These are the usual reasons:

  • A shared IP address. Offices, dormitories, public Wi-Fi and many mobile networks put lots of people behind one public address. If someone else on that address triggered a ban, you inherit it.
  • A VPN or a free proxy. Their exit addresses often sit in datacenter networks, and some site owners block whole networks or countries where they do not expect real customers.
  • A country rule. A shop that only ships to a few countries may block the rest, and travel puts you in a country the rule does not allow.
  • Browser extensions. Privacy, ad-blocking or "user agent switcher" extensions can change or strip headers, so the request no longer looks like an ordinary browser.
  • The address you opened. Rules often protect paths such as /wp-admin, /login or an internal API. A bookmarked or shared link that points to one of them can be blocked while the home page opens.
  • An old app or a script with a default identity. A desktop app or a home-made tool may send a library's default User-Agent, which many rules block.

None of these mean your device is infected. They mean one property of the request matched a rule that was written with someone else in mind.

How to fix Error 1020 as a visitor

You cannot change the site owner's rule, but you can check whether something on your side is the property that matched. Try these in order and stop as soon as the page opens:

  1. Check the address. Go to the site's home page instead of a deep link. If the home page opens, the rule is tied to the path you were trying.
  2. Turn off your VPN or proxy extension. If you normally browse through one, try once with your own connection.
  3. Open the page in a private window. Private windows usually start with extensions turned off and without the site's cookies. If it works there, disable your extensions one by one in the normal window to find the one that changes your requests.
  4. Update or switch the browser. An outdated browser or an unusual one can send headers a rule does not expect.
  5. Try another network as a test. Load the page on your phone's mobile data. If it opens there and not on the office or home network, the rule is tied to that network's address; tell the network administrator if you are at work.
  6. Write to the site owner. If nothing above helps, send the site's support team a screenshot of the error page, the Ray ID, the time with your time zone and what you were doing. Cloudflare's own advice for visitors is exactly this: give the owner a screenshot of the 1020 message.

Two things will not help. Clearing cookies rarely matters, because most rules look at the address and headers, not at cookies. And writing to Cloudflare support does not work, because Cloudflare does not decide who a customer's site blocks. Moving between networks only to keep reaching a site that has blocked you on purpose is not a fix either; if the owner does not want that traffic, the honest route is to ask them.

If you own the site: how do you find the rule behind a 1020?

The Ray ID from your visitor's screenshot leads you to the exact rule. The order below follows Cloudflare's own troubleshooting steps:

  1. Get the screenshot or the Ray ID, the visitor's IP address and the time. Ask for the time zone too, because Cloudflare's log records times in UTC.
  2. Open the Security Events log. In the Cloudflare dashboard it is under Security, Analytics, on the Events tab. Search for the Ray ID or filter by the client IP address. The Security Events documentation says events are kept for 31 days, and on the Free plan you see a sample of them, so a single request may be missing.
  3. Read the event. It names the security feature and the rule that blocked the request, along with the properties Cloudflare saw: country, network, user agent and path.
  4. Decide whether the rule is too broad. A rule that blocks a whole country or network to stop a few attackers will also stop real customers who travel or use a mobile carrier's shared address.
  5. Change the rule, not the visitor. Narrow the expression (for example, only the login path instead of the whole site), or switch the action from Block to Managed Challenge, which lets a real person through after a check. The Log action, useful for testing a rule before it blocks, is available only on the Enterprise plan.
  6. Exempt your own tools. If your uptime monitor, payment provider callbacks or internal scripts get 1020, add a custom rule with the Skip action that matches only them (by IP address or a header you control) and place it before the blocking rules.
  7. Make the page useful. Cloudflare lets you replace the 1020 page with your own, so you can add a support email and ask visitors to include the Ray ID.

When the block comes from an API Shield check rather than a custom rule, the fix is usually on the client side: the request did not match the schema you uploaded, or the token was missing or expired. The event in the log tells you which check failed.

If your script or API client gets Error 1020

For a program, 1020 shows up as status 403 with an HTML body that contains the code, and a Server: cloudflare response header plus a CF-Ray header that holds the Ray ID. The HTTP standard, RFC 9110, defines 403 as a request the server understood but refuses to fulfill, and warns that a client should not automatically repeat a forbidden request. Retrying in a loop does not change the outcome and only fills the owner's log.

The most common reason a script gets 1020 when a browser does not is its identity. We started a small header-echo server on our test machine (127.0.0.1) and called it with four common clients. curl 8.23.0 sent User-Agent: curl/8.23.0 with only three headers in total, Python requests 2.34.2 sent python-requests/2.34.2, httpx 0.28.1 sent python-httpx/0.28.1 and Node 24's built-in fetch sent just node. A rule that blocks known library names, or an empty User-Agent, catches all of them. The MDN User-Agent reference shows how well-known crawlers name themselves and add a link to a page that explains them.

The answer is not to make the script pretend to be a browser. The answer is to identify the client honestly and agree on access with whoever owns the site. The function below sends one request with a descriptive name and tells you which kind of block came back:

python
import requests

def explain_block(url, timeout=15):
    """Fetches the URL once and reports whether a Cloudflare 1020 block page came back."""
    r = requests.get(url, timeout=timeout, headers={
        # An honest name for your client, with a contact address
        "User-Agent": "acme-stock-sync/1.4 (+https://example.com/contact)",
    })
    from_cloudflare = "cloudflare" in r.headers.get("Server", "").lower()
    ray_id = r.headers.get("CF-RAY", "-")
    if r.status_code == 403 and from_cloudflare and "1020" in r.text:
        return f"Error 1020: a site owner's security rule blocked this request. Ray ID: {ray_id}"
    if r.status_code == 403 and from_cloudflare:
        return f"403 from Cloudflare without code 1020 (WAF block page or another rule). Ray ID: {ray_id}"
    return f"HTTP {r.status_code}, Cloudflare: {from_cloudflare}, Ray ID: {ray_id}"

if __name__ == "__main__":
    import sys
    for u in sys.argv[1:]:
        print(u, "->", explain_block(u))

Against a local test page that returned 403 with a 1020 body, the function printed the Error 1020 line with the mock Ray ID. Against https://www.cloudflare.com/ it printed HTTP 200, Cloudflare: True and a real Ray ID ending in -CDG, the code of the data center that answered. Keep the Ray ID from a blocked run: it is what the site owner needs.

What to do next depends on whose site it is:

  • Your own site or your employer's. Ask the owner to add a Skip rule for your script's fixed IP address or for a secret header only your script sends. That is the official way to let your own monitoring through.
  • A partner's or a supplier's API. Ask for API access and a key. Documented access is tied to your key and does not depend on how your requests look.
  • A cloud server. Rules that block datacenter networks catch scripts that run on cloud servers. Again, ask for an allowlist entry rather than hiding where the request comes from.

If the page you get says 1010 rather than 1020, the rule looked at the browser's signature specifically; that case is covered in Cloudflare Error 1010: What a Banned Browser Signature Means.

When is a proxy's IP address the cause?

A proxy can be the reason for a 1020 when its exit address is shared or has a poor history. Free proxies and cheap shared pools put many unknown users behind the same address, and a site owner who saw abuse from that address or its network may have blocked it. In that case the block was earned by someone else's traffic.

The fix is to send your own legitimate traffic from an address with a clean history, not to change addresses until a rule stops matching. A QA team checking how its own site behaves for visitors in other countries, or a business monitoring its own listings, can use Residential Proxy with country targeting, which come from home internet connections. When a site owner needs to allowlist you by address, ISP Proxy give you a fixed IP that you can send them and that only your team uses.

A proxy does not change a rule that the owner wrote on purpose. If a site blocks a country, a network or automated clients and you are not the owner, the only fix that lasts is asking the owner for access.

Common mistakes

  • Refreshing again and again. A 1020 is not a rate limit; the same request gets the same answer, and each one adds a line to the owner's log.
  • Writing to Cloudflare instead of the site. Cloudflare enforces the rule but did not write it, and it does not change customers' security settings.
  • Sending a screenshot without the Ray ID or the time. The owner then has to search a log of thousands of blocked requests by hand.
  • On the owner's side: blocking whole countries or networks to stop a few attackers. It works, and it also stops real customers who travel or share a carrier address.
  • On the developer's side: disguising a script as a browser. It turns a simple support request into a standoff with the site owner; ask for an allowlist entry or an API key.

Decision guide

Your situationWhat to do
The page opens on mobile data but not at home or workThe network's address is blocked; tell the network administrator
It works in a private windowAn extension changes your requests; disable them one by one
You use a VPN or a free proxyTurn it off and try your own connection
Only one deep link is blockedStart from the home page; the rule protects that path
Nothing helpsSend the site owner a screenshot with the Ray ID and the time
Visitors report 1020 on your siteFind the Ray ID in Security Events and narrow the rule
Your own script or monitor is blockedAdd a Skip rule for its fixed IP or a secret header
A shared proxy address is flaggedUse a clean, dedicated address for your own legitimate traffic

Frequently asked questions

Is Error 1020 a permanent ban?

It lasts as long as the rule matches your request. There is no timer like a rate limit has, but it is not tied to you personally either: if the property that matched changes (another network, no VPN, a different page) or the owner changes the rule, the page opens again.

Is Error 1020 a virus or a problem with my internet?

Neither. The page comes from the security layer in front of the site you tried to open, and other sites keep working. It only says that one rule on that site matched your request.

Can Cloudflare support unblock me?

No. The rule belongs to the site owner, and Cloudflare's own guidance for visitors is to contact the owner with a screenshot of the error. Look for a contact email, a support form or the site's social media accounts.

Does a VPN fix Error 1020?

Usually it makes things worse. Many VPN exit addresses sit in datacenter networks that site owners block on purpose. If you see 1020 with a VPN on, turn it off first.

What is the difference between Error 1020 and "Sorry, you have been blocked"?

Both are Cloudflare blocks set up by the site owner and both return 403. On Cloudflare's current platform, WAF custom rules and managed rules show the "Sorry, you have been blocked" page, while 1020 comes from other security features that block without a custom response. For a visitor the steps are the same; the site owner uses the difference to know where to look.

Where do I find the Ray ID?

It is printed near the bottom of the error page as a string of letters and digits. In a script you can read it from the CF-Ray response header. Send the latest one you saw, because every new request gets its own Ray ID.

Summary

Cloudflare Error 1020 means a security rule set by the site owner matched your request and blocked it with status 403. The page hides the reason, but the Ray ID lets the owner find the exact rule in the Security Events log. Visitors can check the address, turn off a VPN or extensions, try another network and then write to the site with a screenshot; owners narrow the rule or add a Skip rule for their own tools; developers identify their clients honestly and ask for an allowlist entry or an API key. If the block comes from a shared or flagged proxy address on your own legitimate traffic, a clean address that only you use removes that cause; you can compare the options on our proxy services page.

Ask ChatGPTAsk Claude