How to Block Websites on Edge Browser (Simple Way)

From time to time, you will see a website you just want to block. Maybe the website is a spammy one or is just a lot of distraction, like Facebook. This is especially true when children are involved and spending a lot of time on those websites. If you regularly use Microsoft Edge browser, you might have seen that there are no obvious options to block websites on Edge browser. That being said, you can use the hosts file to block a website on Edge browser. Let me show you how.

How to Block Website on Edge

To block website on edge browser, we will use the hosts file method. In the hosts file, we will add the website we want to block. In case you don’t know, the hosts file is used to map IP addresses to human-readable website addresses. So, what we will do is map the website we want to block to a local IP address called localhost. i.e.,

Once you map a website address to localhost, you cannot access that website. This is because whenever you enter the URL in the browser’s address bar, it tries to access the localhost. Since localhost is just our computer, the website does not load. For more information on the hosts file, visit this page.

Steps to Block Websites on Microsoft Edge Browser

1. First, open the start menu and search for Notepad. Now, click on the Run as Administrator option in the right panel. You can also right-click on Notepad and select Run as Administrator option.

Block websites on windows 10 edge browser 01

2. In the Notepad, we need to open the hosts file. To do that, go to File and select Open.

Block websites on windows 10 edge browser 02

3. The above action will open the file selector window. Here, go to C:\Windows\System32\drivers\etc folder. Once you are here, select All Files from the bottom right drop-down menu.

Block websites on windows 10 edge browser 03

4. Now, select the hosts file and click on the Open button. This action opens the hosts file inside notepad where you can add the website to block in Edge.

Block websites on windows 10 edge browser 04

5. In the hosts file, use the below format to block websites on Edge browser. Don’t forget to replace with the website name of your choice. The line starting with # is a comment line where you can write why you are blocking the website. This makes it easy to remember why you blocked the website when you next open the hosts file. This is not a requirement. So, if you want to, you can delete the comment line.

Note: make sure there is at least one space between the localhost IP address and the actual website address.

# Comment line to write why you blocked the site (useful but not required)

Block websites on windows 10 edge browser 05

6. You can follow the same procedure to add as many websites as you want to block websites on Microsoft edge browser. For instance, I’ve blocked Facebook on Edge with a custom comment.

Block websites on windows 10 edge browser 08

7. After adding websites to block on Edge we need to save the changes. To do that click on the File menu and select Save. You can also press the keyboard shortcut Ctrl + S.

Block websites on windows 10 edge browser 06

8. After saving the file, close it by clicking on the X icon appearing on the top right corner.

That is it. From now on, Edge browser blocks the website.

Block websites on windows 10 edge browser 07

Keep in mind that once you block a website using the hosts file method, it is blocked system-wide including on all other browsers.

If you like this article, check out how to disable autoplay videos on Edge and how to change saved passwords on Edge.

Scroll to Top