And myspace.com
& <every_other_host_at>.myspace.com
The problem is: the hosts file doesn't do wildcards, so you must track down & enumerate every offensive host at every blocked domain & put each one in a separate line in your hosts file. Not only that, when <blocked_domain>.<tld> adds a new server, you must discover it & add it.
Consider the HOSTS file from
www.accs-net.com/hosts:
http://www.accs-net.com/hosts/Downloads/hosts127001.zip
I grepped it for each of the domains that had a host "ad250", piping the result through
wc -l, here the results:
Code:
hpg.ig.com.br 1065
hpg.com.br 877
ezcybersearch.com 269
popupad.net 269
erasercash.com 267
paycount.com 266
(I know a guy whose hosts file runs over 30,000 entries! Of course, he is doing serious malware as well as ad blocking.)
You're much better off taking the proxy server suggestion or using DNS.
If you want to pursue using DNS, you might consider adding
dnsmasq to your router. Besides being a small combo DHCP & DNS server, you can block whole domains w/ one simple line per entire domain in its config file.
If you already have Bind running, then see
http://pgl.yoyo.org/adservers/ for information on how to get it to block domains.
are especially useful.