And not calling it so doesn't make it any less nonsense. Now will you please acknowledge the big downsides of the HOSTS file approach:
- doesn't support wildcards, but the bad guy's DNS server does. We will simply use .domain.tld, and you'd never be able to keep up with that (for a sufficiently long subdomain name)
- heavily interferes with DNS resolving and partitially breaks DNS caching
- applies to every DNS lookup instead of just the ones issued by the exposed application
- cannot be updated by a non-administrator user, and neither should
- OK, if I was an evil guy I'd add many non-malicious servers into the list as well, and I'd make it so large that it seriously break the system. Congratulations for having created a wonderful DoS condition.
- the HOSTS file is a 30 years old, totally outdated idea
As far as this concludes, only totally stupid computer users would follow such a ridiculous approach, and it seems like there are a lot of them. You're one, too!
Now coming to serious approaches on filtering spam from websites:
- AdBlock Plus. Simple, efficient, supports wildcards and filtering specific elements.
- wildcard DNS manipulation using a local caching-only nameserver. BIND is particularly easy, but PowerDNS works as well.
- blocking network segment by IP address range using a host-based packet filter or a firewall
At any rate, no approach whatsoever could be a security concept, it's only good for filtering out advertisement and other kinds of annoyance - it can't make a vulnerable internet facing application any less critical. Therefore, this entire discussion *is off-topic here*!