I've disallowed a directory by following this and looked at cloudflare's KB

I've turned off all the features from the page rules:enter image description here

Here are a few that are not disabled because I didn't think I needed to disable it or not sure of which value to add:

enter image description here

I need to disallow a directory because it is causing a cloudflare Error 520 issue. They URL is an admin URL which I dont want to give to my webhosts.

Any one know of a solution to fix this?

  • And have you cleared the cache? after applying Cache Level: Bypass? Mar 20, 2017 at 23:42
  • @SimonHayter yeah I hadn't initially but I have now cleared it over 12 hours ago but I still get the same error 520.
    – Abu Nooh
    Mar 21, 2017 at 17:47

1 Answer 1


Sadly, you can't disable Cloudflare on a per-directory basis with a page rule: By the time a request is matched to your page rules, it has already reached Cloudflare, and will keep causing an error 520 even if you disable Cloudflare cache on the directory.

Yet, you can disable Cloudflare for a specific subdomain, so you may want to create that page rule to forward the requests to another URL, that one being behind a subdomain not on Cloudflare?

Still, errors 520 can be fixed. Their detailed explanation is here, but the short version is that your webserver is either:

  • returning headers bigger than 8KB (typically the case when there's a lot of cookies)
  • prematurely closing the TCP connection coming from Cloudflare

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.