

Using hosts file to block ads - anilshanbhag
http://blog.anilshanbhag.in/post/12511348303/block-ads-the-geek-way

======
infinity
It is generally not true that nothing exists at 127.0.0.2. For example I have
a local Apache server running.

If you are using the hosts file to block the resolution of domains, you can
use 0.0.0.0 which is really false. The blocked domain will not be resolved,
because the operating system will recognize 0.0.0.0 as false, and a local
webserver running on port 80 will not see the requests.

The hosts file is not optimized for large amounts of data, so if this is used
to block an excessive number of domains and subdomains, the whole process of
name resolution will be slowed down.

The good thing is that a block via the hosts file applies to the whole system
and all browsers.

Another bad thing is that the hosts file does not support something like
wildcards or regular expressions, each domain or subdomain has to be blocked
individually.

