Block access to domain directory

Hi what is the best way to block access to a domain directory like this
www.domain.com/directory/*

And only some IPs can access?

Regards

You assigned your topic with a category with “Security - Access”, so I’m not sure whether I want to suggest you a solution using Firewall Rules or Cloudflare Access, which are different products. But I’ll assume that you are looking for a simple Firewall configuration since many people assigned their topic with “Security - Access” category but the question is entirely unrelated to Cloudflare Access.

Anyway, if you are using a free plan, try this (not a preferred way, URLs like /something/directory can be also blocked by this firewall rule:

If you are using Pro plan, try this:

If you are looking for Cloudflare Access solution instead, try this:

1 Like

@erictung thanks for the 3 ways to do this.

So strange i try the Zone lockdown rule, and if i choose
http://www.domain.com/directory/*

I can acess to http://www.domain.com/directory but not to the http://www.domain.com/directory/

How to block all the directory?

To work like i need to put 2 domains like this
http://www.domain.com/directory/*
http://www.domain.com/directory

This is normal?

Regards

Try remove the slash http://www.domain.com/directory*

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.