Issues with Blocking Countries via Cloudflare Rules

Dear Cloudflare Support Team,

I am writing to seek assistance with an issue I am currently experiencing while attempting to block access to my website from certain countries using Cloudflare Rules. Despite my efforts, the rules do not seem to be working as expected.

Here is a brief overview of the problem:

  1. Goal: My intention is to restrict access to my website from specific countries.
  2. Configuration: I have created a set of rules within the Cloudflare dashboard to block traffic from the targeted countries. I have double-checked the rules to ensure that they are correctly configured.
  3. Issue: Despite the rules being active and appearing to be correctly set up, users from the specified countries are still able to access my website without any restriction.

I have reviewed the documentation and community forums to troubleshoot the issue, but I have been unable to identify the root cause or a solution to this problem.

I kindly request your assistance in resolving this matter. Please let me know if there are any additional details or information you require from me to investigate and address this issue effectively.

I understand the importance of security and the role Cloudflare plays in safeguarding my website, and I am eager to ensure that the configured rules are working as intended.

Thank you for your prompt attention to this matter. I look forward to your response and appreciate your ongoing support.

Best regards,

Logic issue: Country is not Saudi AND country is not Germany so Saudi is not blocked as its not both Saudi and Germany at the same time, Germany is not blocked as its not Germany and Saudi at the same time

To block Saudi and Germany needs to be OR


Hi paul, first of all thank you for your answer.i changed it to or but unfortunately the problem still existing.thanks

Just spotted your rule says "Block every country EXCEPT Saudi Arabia OR Germany

If you only want traffic from Saudi Arabia and Germany then probably should be “Country” “does not equal” “Saudi Arabia” or “Country” “does not equal” “Germany” then block

If you only want to block Saudi Arabi and Germany then probably should be “Country” “equals” “Saudi Arabia” or “Country” “equals” “Germany” then block

You could use “Country” “is not in” and then add all the countries you do not want to want to block - I prefer this method of allowlisting so you list only where you want traffic from, and the list is a lot simpler and you only have a single line rule

Make sure this is the first rule in the list

You may want to add the country T1, TOR, to the blocked list

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