How to block country from specific country?

Hello, I am getting visitors from China who are clicking on Adsense ads. My site shouldn’t get traffic from China. Although traffic is quite low but for some unknown reason there are a lot of adsense click from there.
I want to block countries like this.
How can I achieve it without negatively affecting site performance in any way?

You can use the firewall rules on the dashboard to block countries (you get 5 rules on the free plan)

Is there any step by step guide for it?

This should do it.

Screen Shot 2021-05-06 at 9.39.26 AM

2 Likes

Thanks @sdayman

Was just about to do that :slight_smile:

@Fleeting Use this link to go to that page https://dash.cloudflare.com/?to=/:account/:zone/firewall/firewall-rules

Then do what @sdayman suggested in the above picture :slight_smile:

2 Likes

Thanks a lot both of you.

1 Like

One more thing, will it also prevent access of good bots (Google)?

No, because the IP location of Google’s IP’s should be the US not CN.

You could also add an IP access rule for AS1569 (Google) with an action of allow

The IP access rules trigger before the firewall rules so if it’s a Google IP, any firewall level rules would be skipped.

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