Where to put this
Paste the IP addresses or CIDR ranges you have identified as sources of fraudulent clicks (from your ad
platform's reports or server logs), choose your server type, and this generates the correctly formatted block
rule - Apache 2.4's Require not ip syntax, the older Apache 2.2 Deny from syntax, or
Nginx's deny directive. Add the Apache snippet to your site's .htaccess file, or the
Nginx snippet to the relevant location or server block and reload Nginx.
Why blocking an IP at your own server only solves half the problem
A server-level block stops that specific IP from loading your pages at all going forward, which protects your site and its resources - but it has no effect on how an ad network's own fraud-detection system scores past or future clicks from that IP on their end. Both server-side blocking and reporting suspected fraud to the ad platform address genuinely different parts of the problem, which is why doing one doesn't substitute for the other.
Why Apache 2.4, Apache 2.2, and Nginx each need their own distinct syntax
Access control directives changed meaningfully between Apache versions (the newer Require
syntax replaced the older Order/Deny syntax), and Nginx uses an entirely different
configuration language from either - pasting Apache syntax into an Nginx config, or vice versa, simply won't
work, which is why getting the server type right before generating the rule matters.
Why CIDR ranges matter alongside individual IP addresses
A fraud source is often not a single IP but a whole block controlled by the same proxy service or data-center provider - blocking a CIDR range (like 198.51.100.0/24) covers an entire block of addresses in one rule, which is far more effective against a persistent source than blocking individual IPs one at a time as they rotate within that same range.