Cloudflare and htaccess Country Block Still Misses Some Traffic from Blocked Country


SetEnvIf CF-IPCountry RU BuzzOff=1
Order allow,deny
Allow from all
Deny from env=BuzzOff

We are using above rules on our htaccess file. But I realize I still get some traffic from RU . Why it doesnt completely block that traffic?


@fixingmywp You should use Cloudflare Access Rules


How did you determine you still get some traffic from RU? Example?



How did you determine you still get some traffic from RU? Example?

Because Google Analytics (and others) shows constant traffic comes from that country day by day.


I already use that.


It is entirely possible the Google Analytics and Cloudflare use different data sources to determine where an address is located and that there can be variance between the two. Assuming that the .htaccess rule is blocking based RU country code when it sees it, then the traffic coming in must be identified as a different country in the CF-Country value.


I am experiencing a similar situation. I created a thread about this here (Access Rules - Javascript Challenge Bypassed) which may explain the results you are getting.

In my case, javascript challenge for certain countries is being bypassed as even though the bot ip is from a country which should be presented the challenge (via access rule) it is entering my site via a country where no challenge has been set (e.g., USA).

closed #8

This topic was automatically closed after 14 days. New replies are no longer allowed.