DNS sinkhole

Some of the larger botnets have been made unusable by top-level domain sinkholes that span the entire Internet.

[3] DNS Sinkholes are effective at detecting and blocking bots and other malicious traffic.

By default, the local hosts file on a computer is checked before DNS servers, and can be used to block sites in the same way.

Sinkholes can be used both constructively, to contain threats such as WannaCry[4] and Avalanche,[5][6] and destructively, for example disrupting DNS services in a DoS attack.

[8] Another use is to block ad serving sites, either using a host's file-based sinkhole[9] or by locally running a DNS server (e.g., using a Pi-hole).