How to restrict site access to a single country with Cloudflare
04.06.2026
Open the Cloudflare dashboard and go to Security > WAF > Custom rules. Create a new rule, use the expression (ip.geoip.country ne "TR") and set the action to Block. Once the rule is saved, every request coming from outside Turkey is blocked. Swap the country code in the expression for any other country you want to allow.