| > I certainly wouldn't want a HOSTS file that big. The vast majority
| > of the entires are bound to be sites I'll never visit, either first-
| > party or third-party.
|
Another option, which you may already know about,
is to block 3rd-party images. In Firefox/Pale Moon
that used to be an option in the settings. With the
corrupting influence from Google it was changed and
hidden. (Mozilla get nearly all of their excessive
income from Google.) But the setting is still there in
about:config
set (create if necessary): permissions.default.image 3
That also seems to block other external files. It can
make some websites ugly, in cases where a CSS file and/or
images are loaded from a different domain. But for the
most part it works OK. The vast majority of ads are coming
from 3rd-party spyware servers like Google/Doubleclick, so
with 3rd-party images blocked you allow honest ads -- the
ones that are actually on the website you chose to visit --
and you block spyware ads.
There are also the issues of script and iframes. If you
only care about blocking ads then that won't matter, and
you might not want to put up with the hassle. But if you
care about being tracked, take a look at this code in the
pastebin page you linked:
<iframe src="//
www.facebook.com/plugins/like.php?
Code like that is in most commercial webpages. It's loading
a webpage from Facebook into a iframe, which is essentially
a second browser window. What you see is just a small Facebook
button. If you block 3rd-party images you might not even
see that. But technically you've visited Facebook. The parameters
in the page request tell information about where you're coming
from, and by requesting the page you send your IP address,
userAgent, etc to Facebook. That means that Facebook is
following you all around the Internet, even if you've never visited
their website. If you have a Facebook account then their iframes
allow them to know what you're doing when you're not logged in.
Even if you just allow first-party cookies they can probably know
who you are easily. The iframe they use makes their hidden webpage
a page that you "chose" to visit, so any cookies loaded from it
are first-party. But that's just icing on the cake for their datamining
operation. Your IP is probably enough for them to figure out who you
are, and to track your movements online.
Your massive HOSTS file is blocking at least 5 domains from
Tomshardware.com, which you may never visit. It's blocking
image servers from various countries. It even blocks f**
k.org
and
zerofreepopcorn.com, whatever they are. :) But it doesn't
block Facebook. It doesn't even block
google-analytics.com,
which is tracking you from the vast majority of webpages you
visit, including your pastebin page. That's the trouble with a
giant HOSTS file. It's likely to be 98% irrelevant, and while
you're blocking the oddball ad server from some obscure page
you'll probably never visit, you're not necessarily blocking the
sites that matter most.
Also worth a try is Acrylic, which is a free DNS server program.
It acts as a proxy and has it's own HOSTS file that allow wildcards.
So you can block things like *.
doubleclick.net and *.
doubleclick.com
to block all Google/Doubleclick ads. The normal HOSTS file requires
adding each possible subdomain. If you look at your HOSTS file
you'll see a great deal of redundancy due to that problem. Ad
servers can just keep changing the subdomain to thwart your
HOSTS file. You might have entries for 200 Doubleclick subdomains,
but you don't have an entry for the one they might create next week.