Blocking Ads on Microsoft Edge using Hosts Files

Microsoft Edge doesn’t come with a native Adblock. And since it doesn’t support extensions, it cannot add any extensions that block ads either like Chrome or Firefox. If you are annoyed about the ads and popups that fill on the Internet these days and want to block all kinds of ads on Edge, you need to look for something other than a browser extension.

Adguard web filter could be one of the options that work on a network level regardless of what browsers you are using. Utilizing a hosts file with a list of ad URLs that you want to block could be another option.

Buried deep down in the Windows folder, the hosts file in Windows is used to map hostnames to IP addresses. It’s basically a plain text file containing lines of text consisting of an IP address in the first text field followed by one or more hostnames, such as

127.0.0.1   localhost

But if used purposely, a customized hosts file can be used to block websites and domains that you consider dangerous.

For example, by adding the following line in hosts, it basically re-route the traffic to an unreachable place to achieve the goal of blocking Google Adsense from showing up on any of the websites you are visiting.

0.0.0.0  *.googleadservices.com

The concept isn’t hard to understand, but it’s not easy to implement. In order to make it work, you will need to gather all information about the ads you want to block. And doing so all by yourself is going to be a task that requires too much effort. Luckily, someone already did all the work for you and have created a HOSTS file specifically designed for this task.

And here are the steps how to make it work.

 

  1. Navitage to c:\windows\system32\drivers\etc folder and make a copy of original hosts file as a backup in case you need to revert back to the defaults.
  2.  Download hosts.zip file (direct download link) and extract the hosts file from the Zip container directly to c:\windows\system32\drivers\etc.
  3. Click OK or continue to the dialog box that pops up along the way.

That’s about it. The change takes place right away. You can visit any website that has Google Adsense ads to check if they are being blocked.

Again, it’s not an ideal solution to get ads blocked on Edge, comparing to the Adblock extensions on other browsers. But it’s better than nothing. If you are super annoyed by those very aggressive ads, this at least can get some of them blocked out.

Leave a Reply

Your email address will not be published.