Tim:
But, yes, you can blackhole various annoying domain names so that they fail quickly. I've done that for many years with BIND.
Joe Zeff:
And, if you're not hosting your own DNS, you can use /etc/hosts to do the same thing on a machine by machine basis. Of course, this isn't practical if you're running a large LAN, but it's just great for a home user.
I used to do that, but using the hosts file only leaves you with two choices: Give annoying domains a wrong IP to connect to that either tries to load non-existent files from a real server (wasting traffic and filling logs), or tries to connect to a server that isn't there (and waits a long time for a timeout).
For many years I've used a zone file in my DNS server that instantly returns a "no answer" for any forbidden domains (and subdomains), that kills annoyances without any delays.
Have you ever tried to load a page, only for there to be some big long delay before parts of the page loaded? The server is waiting for something before it continues. On pages full of crap, that can add up to a long wait. Removing those delays is as important as removing the annoying adds (and malware).
There are proxies and plugins that can do the same kind of thing of removing annoying content from webpages. But I found that my DNS deadzone that I've pointed about a dozen domain names at has worked well for many years without needing updating all the time.