Chris123NT's Blog

Where I rant and rave about all things tech

Blocking Ads with Microsoft Edge (Project Spartan)

So to start this off with a bit of a preface, this post is one that before 10 minutes ago I didn’t really know I would be able to write as I want a solution that is effective but doesn’t compromise performance.

I have been keeping track of Microsoft Edge since its very early days and I’ve been noticing as of late how it is completely kicking the crap out of Chrome and Firefox in web benchmarks.  This led me to actually want to give it an honest chance and see how it performs in real world use for a week, but in order to do that I needed an effective ad blocking solution.  The reason being that while the modern web is great, modern web advertisers suck, they are more in your face than ever before and are getting worse by the day.  So with that said, it is obvious that blocking intrusive ads is a MUST for a pleasant web experience.

Since there is no extension support in Microsoft Edge yet, we have to use an alternate method to block ads for now, until Microsoft actually decide to give us this functionality, which is said to be after RTM this summer.  The easiest method is to use a HOSTS file that blocks known ad providers so the ads never actually load in your browser.  However there is another tweak you need to do so the experience of using a large HOSTS file doesn’t diminish performance of your web browsing and DNS resolution, so let’s get to it shall we?

So the first thing you need to do is find a reputable source for a HOSTS file mod that actually blocks ads.  The best source I have personally found is here:

Once you download that file, extract it anywhere and go into the folder and run mvps.bat as administrator.  This will install the hosts file mod and now all known ads and malicious sites will be blocked from your PC.  However, there is another step to ensure smooth performance with DNS resolution, as large HOSTS files tend to cause issues with the default settings.

To apply this tweak you need to do the following:

  1. Open Regedit
  2. Navigate to HKLM\SYSTEM\CurrentControlSet\Services\DnsCache\Parameters
  3. Create a new DWORD “MaxCacheTtl” and set the value to 1
  4. Create a new DWORD “MaxNegativeCacheTtl” and set the value to 0
  5. Reboot your PC

Once you have done the above, you will have an effective ad blocking solution that will work across your entire system (including Microsoft’s new browser), and with the added tweak there will not be any performance hit in your browsing experience.  Without the added tweak you would notice site loading delays, especially with sites like Hulu etc…

So anyway I hope you enjoy this and as always feel free to ask questions or post comments!

Tags: , , , , , ,

  • Alex Angas

    Could you please elaborate on what these registry changes really do, and what negative effects might be encountered? Why would MS have set the defaults they did?

  • Tin Cvitkovic

    Does DWORD only apply for 32-bit system software or 64-bit too , thanks

    • Ikem Krueger

      They apply to both systems.

  • Rick

    did it 7-29-2015 and didn’t work at all!

    • Raygun

      I did it 7-31-2015 and its not working either.

  • Sezer

    It did work, but i don’t like it, so i want uninstall it, if i start mvps.bat again, nothing happens

  • Cesar

    It worked but I want to know if I can undo this process?

    • Cesar

      After a couple of days the ads are back again, did I do something wrong or it just simply doesn’t work

  • Adam

    Works well for me (Windows 10 final) – thanks! Now I just need a way to make Flash “click to run” like it was when I blocked ActiveX controls in IE11.

  • Wam1q


  • Fred K

    I am so glad I found this thread. I have added SpywareBlaster (SB) by Javacool now published by, which protects against other bad sites and has options to take system snapshots and encrypt backups of the Hosts file for further protection.

    Works as advertised with Edge, Palemoon (variant of Firefox), and IE. I am down literally 100% of those annoying adverts. I am allowing Flash, although SB can shut that down also.

    I am running 32-bit 10 Pro, clean install on dual boot on a 5-yr old Dell Optiplex 380.

    Fred K


  • Gregory Winters

    How many of these useless blogs are there about blocking ads? Can’t anyone see how ridiculous all these approaches are? Editing the Registry…or the HOSTS file, etc. Haven’t we all heard the joke “Would you like fries with that?” Well, why do you think they ask you that at the burger joint? BECAUSE YOU DIDN’T ASK FOR FRIES IN THE FIRST PLACE. All of this crap could be stopped in a single instant: be able to configure the browsers to load only the primary domain in the Address Bar. There. Done. When I typed in, I did NOT ask for, now, did I? What is so difficult about this?

  • gibbon

    Fukken brilliant thx mate

May 2015
« Oct   Feb »