Custom rule for country is not working

Answer these questions to help the Community help you with Security questions.

What is the domain name?

Have you searched for an answer?
Yes

Please share your search results url:

When you tested your domain, what were the results?

Describe the issue you are having:
We’ve allowed some countries only but it’s not working site is opening from any country

What error message or number are you receiving?

What steps have you taken to resolve the issue?

Was the site working with SSL prior to adding it to Cloudflare?

What are the steps to reproduce the error:

Have you tried from another browser and/or incognito mode?
Yes
Please attach a screenshot of the error:

Is the DNS record for your site proxied?

Otherwise, what is the domain?

Yes DNS are proxied and also purged the cache. I’ve checked and still I’m able to access the domain from any country.

Do you have any rules before that one that would skip it?

Check that the rule is enabled…
https://dash.cloudflare.com/?to=/:account/:zone/security/waf/custom-rules

What is the domain?

No I don’t set any rules before.

Is the rule enabled?

What is the domain?

Maybe the logic is the problem: just allowing some countries, does not mean other countries are automatically blocked, unless you have a block rule active, as well.
Please check if the logic makes sense to achieve what you want, and let us know if you need further help.
This should also help:

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