Restricting access to specific URI

Okay, sure.

Yes, you can achieve this if your domain is using Cloudflare service.

You could create a Firewall Rule. and restrict it by an IP address or a set of IP addresses as you need.

Example from below, restricted access for the path of mydomain.com/secure to the set of IP addresses only (any request comming from different a IP address than I set would see Access denied - 1020 Error page):

Expression example:

  • (http.request.uri.path contains "/secure" and not ip.src in {1.2.3.4 10.20.30.40 100.200.20.10})

Image example:

Helpful documentation regarding Firewall Rules and usage:

Useful Firewall Tips:

2 Likes