Categories: Windows

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.

edge

Share
Published by
edge

Recent Posts

Disable Copilot on Windows 11 via Group Policy GPO

If using Copilot right from the Taskbar isn't your thing, you should disable it. Even…

8 months ago

Setting Default Fonts in Word, Excel, Outlook, and PowerPoint via Group Policy

In an environment where standardizing things does matter, setting default fonts in Microsoft Office apps…

9 months ago

Wake-On-LAN (WOL) with Windows and PowerShell

Wake-On-LAN is a networking standard that lets you wake up a computer from either a…

9 months ago

How To Remove Restrictions Set in A Password-Protected PDF File

First of all, this is not to bypass a PDF file that requires a password…

9 months ago

How To Move My Outlook Navigation Bar Back From Left Back To the Bottom

Microsoft has been lurking about the idea of placing the Outlook navigation bar to the…

2 years ago

Headset with Microphone Echoing My Own Voice on Windows, What To Do?

One colleague came up to me the other day asking me to take look at…

2 years ago