Blocking Websites in Microsoft Edge

Microsoft Edge doesn’t have a built-in feature to block websites directly. If you’re looking to restrict access to certain sites, here are a couple of methods to achieve this.

Method 1: Using the hosts file

Modifying your system’s hosts file is the most effective way to block websites. This approach prevents access to those sites across all browsers installed on your computer, including Edge. This method works by redirecting the blocked domain to your local machine, making it unreachable.

  1. First, you’ll need to open Notepad as an administrator. Click on the Start button and type in “Notepad”. When it appears in the search results, right-click on it and select “Run as administrator”.
    Notepad search

  2. You might get a User Account Control popup. Click “Yes” to give Notepad the necessary permissions.
    User account control

  3. Inside Notepad, go to File in the menu and select Open (or press Ctrl+O). A file explorer window will pop up.

  4. Now, navigate to the location of the hosts file by pasting the following path into the address bar of the file explorer:

C:\Windows\System32\Drivers\etc

Hosts file location

  1. By default, you might not see any files in this folder. To fix that, change the file type filter from Text Documents (*.txt) to All Files at the bottom right of the window.
    Change to all files

  2. You should now see the hosts file in the list. Select it and then click on Open.
    Open the hosts file

  3. Scroll down to the bottom of the file and add a new line. Then type 127.0.0.1 followed by the address of the website you want to block. For example, to block YouTube, you would add this line:

127.0.0.1 youtube.com

Line to block youtube

  1. To save your changes, press Ctrl+S or go to File and click Save. You can then close Notepad.
    Save changes to the hosts file

  2. After saving, you might need to clear your browser’s cache for the changes to take effect. Now, when you try to access the blocked website in Edge, it will be inaccessible.
    Blocked website

Keep in mind that this method works system-wide. If you’re using a VPN or proxy, the hosts file may not be as effective.

Method 2: Using a browser extension

If you prefer a browser-specific solution, you can use a Microsoft Edge extension like “Block Site”. This allows you to manage blocked websites directly within Edge.

  1. Open Microsoft Edge and click the three dots located at the upper-right corner.
    Edge menu

  2. From the dropdown menu, select “Extensions”.
    Edge extensions

  3. On the Extensions page, click on “Get extensions for Microsoft Edge” to find new extensions.
    Get extensions

  4. In the Edge Add-ons store, use the search bar to find “Block Site”. Or, if you prefer, you can go directly to the extension page using this link. Click “Get” to install it.
    Block site in extensions

  5. A confirmation box will show up. Click “Add extension” to complete the installation.
    Add extension confirmation

  6. Once installed, the “Block Site” icon will show up on the toolbar. To block a site, browse to the page, then click on the extension icon.
    Block site toolbar icon

  7. In the extension’s popup, you’ll see the current website’s info. Click “Block this site” to add it to the block list.
    Block site popup

The page should refresh, and the site will now be blocked. You’ll see a message saying the site is blocked by the extension.
Website blocked message

  1. To manage your blocked sites, click the extension icon and click the gear icon to open the settings.

  2. In the settings, under “Block Sites”, you can manually enter websites you wish to block. Hit “Enter” after typing each URL to add it to the list.

Keep in mind that this extension doesn’t have a password and anyone using your browser could remove blocked sites or uninstall the extension itself.