Tutorial Windows: Blocking Ads in Microsoft Edge via the HOSTS file

What happens when you get a new toy car, but the doors, trunk, and hood won’t open, wheels won’t turn, and isn’t fitted with a little motor to give it some momentum, unlike your other toy cars do? Well, you either find an excuse to get rid of it, or find a way to adapt it.

To better understand the above, just replace the new toy car you got with Microsoft Edge, and the others in your collection with the other web browsers you’re familiar with, even Internet Explorer. There’s no need to waste time, nor precious space to refill you in on what Microsoft did, or did not (yet) include in its brand-new browser, so we’re going to cut to the chase.

A considerable convenience when riding the information superhighway is to have an Ad blocker nearby, just in case you don’t want to bump into any annoying banners, pop-ups, or whatever it is that acts like bad TV commercials.

Since Microsoft Edge isn’t yet able to support extensions, AdBlock Plus and other such solutions can’t be used. However, we wouldn’t be writing this whole article if there weren’t any methods to force Edge into blocking ads.

Editing the HOSTS file

Windows doesn’t recognize websites and domains by their URL, as you do, but rather by their Internet address, like the mailman delivers correspondence by street address and house number, not by people’s names.

The HOSTS file is responsible for this task, and can be used to block websites and domains you consider dangerous or don’t want any other user on your computer to be able to access.

Tip: Discover the Default and Third-Party Apps to Edit the Windows HOSTS File.

Since we brought this up, you need to know that ads can be blocked in a similar way, but doing all the work by yourself is a task that requires too much effort not to quickly give up and look for alternatives.

Luckily, someone already thought of this trick some time back, and created a HOSTS file specially designed for this task. It’s frequently updated with new entries, and you can download and find more about MVPS HOSTS here. Now, we’re just going to go through what it takes to make it work.

Step 1-a: Go to this location

C:WINDOWSSystem32driversetc

Step 1-b: Copy the hosts file (it has no extension) to a secure location to have a backup, in case you ever want to revert changes.

Step 2: Download the zip archive from the MVPS HOSTS website linked above.

Step 3: Extract content, and place the HOSTS file in the directory mentioned above. If you’re asked for overwrite confirmation, click Yes.

Tip: Learn How to Take Ownership of a File or Folder in Windows in case you’re not allowed to overwrite the HOSTS file.
Note: A HOSTS file larger than 135 KB usually slows down the computer, but there is a way this can be solved by disabling the DNS Client service.
Default HOSTS file:
Default HOSTS file

Default HOSTS file

Large HOSTS file:
Large HOSTS file

Large HOSTS file

Step 4: Press Win + R in order to look for, and run services.msc.

Step 5: Scroll down until you see the DNS Client service, and double-click it to access its properties.

Tip: You can click the Name column header to sort in alphabetical order for easier identification.

Step 6: From the Startup Type drop-down menu, choose Manual. Now, press the Stop button. Hit Apply and OK to confirm changes.

Now, whenever you go online using Microsoft Edge, banners and other kind of ads no longer show up. Instead, the banner is replaced with a message that lets you know the specific page can’t be reached. However, pop-ups still show up, but the built-in component should normally handle this, in most cases anyway.

Third-party alternatives

One method is to install Adguard Web Filter, which supports Microsoft Edge and other browsers as well. It’s easy to set up, sitting mostly in the system tray, and doesn’t attach itself to the web browser.

Another similar application is AdFender, and you can read more about it at the link provided, where you also find download links. Unlike Adguard Web Filter, this one also comes with a standard, free edition that is enough for basic ad blocking. Just make sure to bring up the main window from the tray icon in order to select all filters for better chances at blocking unwanted ads.

Important Note: AdFender relies on its own proxy connection, which might make some web pages difficult to respond. This can be disabled from the Settings panel under Network & Internet. From there, switch to Proxy on the left pane, and under Manual Proxy Setup, make sure the Use a Proxy Server option is Off. However, doing so disables the functionality of AdFender.

On an ending note

The thing is, the sole purpose of ads is not to annoy you, but some, if not most websites out there rely on advertising in order to further sustain functionality. For all you know, some ads can even come up with offers you might really benefit from. However, if a clean navigation is all you need, then these methods are sure to help, given you’re fond of Microsoft’s web browser.

Wagiman Wiryosukiro

Petani Sistem Informasi, tukang las plugin & themes Wordpress. Co-Founder SistemInformasi.biz. Saat ini aktif sebagai Developer & kontributor di OpenMandriva Linux.

You may also like...

%d bloggers like this: