I AM your target demographic. Listen up.

The best way to block ads: AdBlock Plus vs. a custom hosts file (HostsMan)

·

After using AdBlock Plus (ABP) for years, I decided to try a custom hosts file for ad blocking instead for a bit. Searching for “Adblock Plus vs. hosts file” produces nothing but forum posts and very few actual comparisons; this should help fix that. The central issue addressed is here is whether in-browser ad block is better that hosts file ad blocking. For this, I’ve selected the most commonly used/best of breed solution for each and compared them based on my experiences with both.

AdBlock Plus

Pros:

  • High granularity: wild cards allow blocking of specific section(s) of a domain instead of the entire domain.
  • Can be enabled or disabled per site.
  • Easily accessible browser based UI.
  • Intuitive UI.
  • Can interactively block elements onscreen.
  • Very actively developed.
  • Filters updated on a daily basis.
  • Is open source.
  • Changing lists or lists subscriptions or otherwise editing rules does not disrupt internet connection.
  • Subscription change effects are seen in real time.

Cons:

  • Very high RAM penalty (~35% in Win64 Firefox 36.0a1 on Windows 8.1).
  • Works only in the browser; don’t block ads elsewhere.
  • Can seriously break browser functionality.
  • Slows browser and PC down because every element URL request has to be checked against blocking rules first, which holds up everything else while that happens.

HostsMan

Pros:

  • No RAM penalty.
  • No CPU penalty.
  • Blocks ads across the entire OS, not just the browser.
  • Don’t break browser functionality.

Cons:

  • Very low granularity: can block entire domains only.
  • Can’t be enabled or disabled per site.
  • Less accessible UI than ABP.
  • Less intuitive UI than ABP.
  • Cannot interactively block elements onscreen.
  • Less actively developed than ABP.
  • Hosts files updated significantly less frequently than ABP lists.
  • Lots of false positives that break website functionality, e.g. sharing buttons and social logins can disappear.
  • Still lets quite a few ads through.
  • Is closed source.
  • Changing the hosts file can (temporarily) disrupt your internet connection.
  • Delete Entry in the hosts file editor often fails after the first use per session.

Conclusion

HostsMan’s main advantage is its lower resource overhead. Sadly, said lower resource usage doesn’t translate into particularly faster page loads or browser performance from a superficial user perspective, and so isn’t nearly enough to overcome its numerous other shortcomings. Ironically, some pages do seem to load slower with HostsMan than they do with ABP. The latter’s better UI and UX make it the winner.

¶¶¶¶¶

¶¶¶¶¶

12 responses to “The best way to block ads: AdBlock Plus vs. a custom hosts file (HostsMan)”

  1. […] *More thorough comparison of ABP and HostsMan. […]

    Like

  2. exactly how is a modified hosts file “closed source”…?

    Liked by 1 person

    1. I said HostsMan is closed source, not modified hosts files.

      Like

  3. Could you please change the title to “THE BEST WAY TO BLOCK ADS: ADBLOCK PLUS VS. HOSTSMAN” ?

    The way you currently have it is misleading and not applicable to the content of the article itself.

    I searched “Adblock vs hosts file” This article clearly refers to something else as you can see.

    Thank you!

    Liked by 1 person

    1. Privacy Paramount Avatar
      Privacy Paramount

      This is a partial solution hosts files are not meant for this and are inherently flawed. I highly recommend converting your hosts files into DNS lists.
      127.0.0.1 http://www.doubleclick.net
      In a host file this does not block doubleclick.net, or any of the billion possible subdomains, so if you block ad.doubleclick.net and they start serving on ads.doubleclick.net you have to play cat and mouse to catch up.

      address=/doubleclick.net/127.0.0.1
      in DNSMasq this would block any and all infinite possibilities of subdomains basically wiping that company from your networks existence, and its future proof. You can block specific subdomains like a host file as well but many of these domains offer 0 value to the customer and should be erradicated.

      DNSMasq is used on many routers, if you have tomato or openwrt, or ddwrt, you can copy and paste it right in and have network wide adblocking on all you devices. The beauty is hosts files do slow down your computers networking when they get too big. DNS is done remotely requests are fast and simple, and get an instant NO, there is no files downloaded, no scripts, or images, or web bugs. If you couple it with a regex configuration you can say block any and all addresses that could ever be possible that start with toolbar. or codec. This is great at killing commonly used subdomains that serve malware ttb. is a massively used subdomain for malware. It may ad a few milliseconds on the regex, but since you never download scripts, images, css, frames, etc,. your browser speed becomes incredibly fast and smooth and since you DNSMasq caches frequent replies, as well as your browser or desktop, most of the replies to blocked sites and frequently visited sites becomes instantaneous. Rather than requesting a sites IP from google DNS you get it locally from your router at like 1ms I have DNSMasq running in this setup on all my portable devices, on my router, and on my VPN servers. It makes the web infinitely more bearable. You may also like uMatrix and uBlockOrigin, created by GorHill; They can import hosts files, adblock plus rules and more. uBlock is faster and more efficient than adblock plus with lower ram usage. uMatrix is like noscript and request policy combined, you can filter cookies, css, frames, images, scripts, xhr, and more, it can enforce SSL only, spoof and rotate your user agent every few minutes. It allows scopes to, so only allow facebook content on facebook.com; on all other sites block deleted deny all facebook content. It’s a fantastic tool and insanely easier to use then noscript or request policy.

      Like

    2. Privacy Paramount Avatar
      Privacy Paramount

      Oh, I also forgot to mention those hundreds of thousands of lines in the hosts files, many of the popular ones contain literally thousands of subdomains from one zero value site that can be summed up in a single line, using DNSMasq and billions of sites can be brought down to a single line with regex functionality.

      Like

  4. Windows only: The hosts file is the best way to entirely block a web site or other net entity. You can edit it by hand, but free editor HostsMan verifies, cleans up, and manages your hosts file clean and simple.

    Like

    1. That was short replay, sorry expected a signup to comment box or something, Anyways let me put it this way people didn’t look into replacing the Host File until the Host file grew larger than 135kb and that was back in the 1980’s *cough* if your using a computer older than 1996 please abandon all things internet, anyways the way it waorks is what needs to be consider, and the fact Everyone is trying make money off AD’s, wow lets design a add-on and profit off something we stop, Add=on’s today are bad news, PLUS look at this way unless you plan on BAKEing Ad-Blocker into the OS from the start , *impossible* the only AD’s your gonna block are the ones through a browser with Ad Blocker installed, MS Edge is out people WAKE UP, microsoft has already said there will be NO addon support for MS Edge OR, or the built in /installed MS store apps that are hard coded into the the OS. That said, drop your beliefs a add-on in 21rst century of 12-15 core cpu operating systems sitting between 2+ stripped SSD’s with enough power to make you go *holy shit* with 32GB RAM+ and even THINK! there is going to be a performance issue from a actual created Host File a operator can tune and maintain themselves. Hope this help, Oh ditch Cortana, or don’t hell place a Add-On on it, lol GL with this topic, or wake up, i really don’t care, people comment to anything and think they know something when i didn’t even hear the explanation of how the host file loads into the system, start there work your way up to making real ad protection for a system.

      Like

      1. LMAO. Edge will have add-on support and in fact is even going to provide built in ad-blocking. Try again.

        Liked by 1 person

  5. […] Discussion (short answer: the person who wrote this wound up choosing AdBlock plus), you decide: https://jdrch.wordpress.com/2014/11…adblock-plus-vs-a-custom-hosts-file-hostsman/   jim mcnamara, Feb 18, 2016 at 7:14 […]

    Like

Comment