I tried to clock the whole country. According to instruction I went to Firewall / Tools / IP Access Rules
Choose “United states”, Block, This website, Add…
and nothing happening. No error, nothing, I cannot add this rule. If I choose “Allow” then I can add the rule. When I try to edit the rule to “Block” but it doesn’t save.
Is this a bug or feature?
Also, is it possible to redirect users from specific country to special page like “We do not serve you yet” ?
You need an Enterprise plan to block countries, but don’t fret, you can simply use a firewall rule, where that will work on your plan too. As always, the search has all the details on that.
Not with the mentioned tools, you’d need a custom Worker for that or customise the respective error page, though this will show up for all users then.
I don’t know how to write such scripts I thought it might be possible to set up simple rule
“if country == US then redirectto page /we-dont-serve-you-yet.htm”
I looked at the worker solution – it is not possible to set up a “worker for country”. Error page… but how can I show error page, I wanted to use Cloudflare I’m paying for every month.
I can write code on my backend to check country, but … Why Cloudflare cannot do such simple thing? Very frustrating
A Worker would work, but would not be country-specific. It would run for all your requests and you would need to handle this yourself, this is where the custom part comes in.