Can WAF block subdomain?

Hello,

could i know cloudflare WAF rule able only to block which domain been proxy orange or we can use for subdomain also?

ex: i want to block not my country if they access to my subdoamin which is my admin.

(not ip.geoip.country in {“country code”} and http.host eq “myhostname.mydomain.com”)

i have set above rule but when test by access from vpn outside my country code it does not work. it can access to my admin control as not set.

pls advice if something wrong.

WAF rules can be applied to subdomains as you have set. The DNS record for the subdomain must be proxied for the rule to have any effect.

2 Likes

unfortunately, cloudflare does not allow subdomain which is use for server, it only allow for web traffic. :relieved:

You mean the subdomain is not for HTTP traffic? In that case, you cannot use the proxy unless you use Cloudflare Spectrum.