An unwanted site keeps opening in Microsoft Edge on your computer and you want it to stop. Three routes work: a web-blocking extension, Edge's Family Safety block list, or a hosts file entry that covers the whole machine.
Start with the extension if you need to block one site quickly. Add the current site from the toolbar, reload the page to confirm the block, and remove the entry whenever you want access back.
In this guide, I have covered:
Contents
Choose How You Want to Block a Website in Edge
A site you don’t want keeps opening in Edge, and you want it gone. The right method depends on how wide the restriction has to be: one site in Edge, a profile covered by family rules, or the whole computer.
A web-blocking extension is the fastest route for a single site, and it gives you a toolbar button to undo the block later. Family Safety suits profiles that already have it turned on. The hosts file blocks a hostname across every browser on the machine, and it is the hardest of the three to edit and reverse.
- Extension: Best for a per-site block in Edge with an easy toolbar control.
- Family Safety: Useful when the profile already uses Microsoft Family Safety and you want the restriction inside Edge’s own settings.
- Hosts file: Choose it only for a computer-wide hostname block, because it is harder to edit and undo.
TIP: Pick one method per site. Stacking an extension rule and a hosts entry for the same domain makes it hard to tell which one is doing the blocking when something goes wrong.
If your goal is only to stop a site from keeping cookies, Edge’s cookie controls for the computer are a different setting. They will not stop the page from loading.
Install a Web-Blocking Extension in Edge
The site you want to block is probably open in front of you right now. Installing an extension from Edge’s own store is the shortest path from there to a working block.
- Open Microsoft Edge on the computer.
- Click the
menu. - Select Extensions.

- Click . Older Edge builds label this button .

- Search for an extension that blocks individual websites.

- Open the listing for an extension you trust.
- Review the publisher and permissions shown on the listing.
- Click .
- Click in the confirmation prompt.

Choose carefully: extension controls differ. Pick one from a reputable publisher, review its requested permissions, and confirm that it can block the domains you need before you rely on it.
Open the
menu and choose Extensions again. The new blocker should be sitting in the installed list before you move on.
Install a Website Blocker from the Chrome Web Store
The blocker you want may only exist in the Chrome Web Store. Edge can install compatible extensions from that store, but you have to allow the store first.
- Open Microsoft Edge and visit the Chrome Web Store.
- Search for the extension you want and click the listing to open its install page.
- Click the Get extension button on the banner at the top of the page. Edge replaces the standard "Add to Chrome" label with this button when it detects Edge.

- If Edge shows a small dialog asking to allow extensions from other stores, click Allow. Edge remembers this choice for future Chrome Web Store installs.
The extension downloads in a few seconds. Its icon appears next to the address bar, or inside the Extensions menu if the extension has no toolbar button.
You’ll know it worked when the extension’s icon appears beside the address bar or inside the Extensions menu. No icon means the store permission step did not go through.
Block a Website with the Extension
Open the unwanted site first. Adding the address you are already looking at beats typing a domain by hand, and most blockers are built around that flow.
- Open the website you want to block.
- Click the Extensions
icon beside the address bar to open the extension’s toolbar controls. - If the extension is not shown, open the
menu, select Extensions, and click the extension’s icon. - Select Block current site or the equivalent control in the extension. Wording varies between extensions.
- Click if a confirmation prompt appears.

Reload the tab, or open the domain again. A working block shows the extension’s blocked page instead of the website. Still loading? Check that the extension is enabled and that the exact domain sits in its blocked list.
Unblock the Website Later
The same extension puts access back without uninstalling anything.
- Open the Extensions
menu. - Click the web-blocking extension’s icon.
- Choose Unblock current site, or remove the domain from the extension’s blocked list.
- Reload the website.
Block a Site with Microsoft Family Safety
Not every Edge profile shows a Family page in Settings. If yours does, use Microsoft’s built-in block list and skip the extension entirely. The control is meant for profiles that already have Family Safety configured.
- Open Microsoft Edge.
- Click the
menu. - Select Settings.
- Select Family in the left sidebar.
- Under Content restrictions, select Block specific sites.
- Type or paste the website address, such as example.com.
- Click .
Open the domain in Edge again. It should fail to load now that the address is on the block list.
If Family is missing: use a web-blocking extension or the hosts file method below. The Family controls are not available in every Edge profile.
Use a Web Filter for Broader Restrictions
A single domain is one thing. If you want Edge to make judgment calls across the whole web, the Filter level dropdown under Web filtering does that job:
- Allow list only: Websites on the allow list stay reachable, and the rest are blocked.
- Designed for children: Allows access to websites considered suitable for children.
- General interest: Allows access to websites considered suitable for all ages.
- Mature content: Restricts access to adult content.
For a single domain, stay on Block specific sites. Reach for a filter level when you want a family-oriented policy applied across the web.
Advanced: Block a Website Across All Browsers
The hosts file maps a hostname to 127.0.0.1, which stops the computer from resolving that name through the network. That covers Edge and any other browser using the system resolver. It is also the method that takes the most care to undo.
Before editing: keep a backup of the original hosts file. A misplaced entry can redirect traffic to the wrong address.
On Windows
You need an elevated Command Prompt here, because Notepad cannot save into the drivers folder without administrator rights.
- Open the Windows Start menu.
- Search for Command Prompt.
- Right-click Command Prompt.
- Select Run as administrator.
- Type notepad C:\Windows\System32\drivers\etc\hosts and press .

- In Notepad, move to the end of the file.
- Add 127.0.0.1 example.com on a new line.
- Add 127.0.0.1 www.example.com on a separate line if you use the www address.

- Click the File menu, then click Save.
- Close Notepad.
- Close Command Prompt.
On macOS
Terminal and sudo do the same job on a Mac.
- Open Terminal.
- Run sudo nano /etc/hosts.
- Enter your administrator password when prompted.
- Move to the end of the hosts file.
- Add 127.0.0.1 example.com on a new line.
- Press + to save.
- Press to confirm the file name.
- Press + to close Nano.
- Restart Edge.
Remove a Hosts File Rule
To restore access, remove only the line that maps the unwanted domain.
- Open the hosts file using the Windows or macOS command shown above.
- Delete the line containing the blocked domain.
- Save the file using the same method you used to edit it.
- Restart Edge.
Clear Edge’s DNS Cache After Editing the Hosts File
You saved the hosts file, restarted Edge, and the site still opens. Edge may be holding an old DNS result. Clear the cache, then test the address again.
- Launch Microsoft Edge on your computer.
- Type in edge://net-internals/#dns in the address bar, and hit key.
It will open the Edge browser DNS network internal page. - Hit the button.

- Quit and Restart the Edge browser.
It will flush the DNS cache from the Edge browser.
A working rule means the domain refuses to load in a fresh tab. If it still resolves, reopen the hosts file and check that the entry sits on its own line with no typo in the hostname.
Check Why a Blocked Website Still Opens
Still seeing the site? Go back to the method you used instead of running through all the steps again.
- Extension: Confirm it is enabled and the exact domain appears in its blocked list.
- Family Safety: Confirm the domain appears under Block specific sites and the selected filter level does not allow it.
- Hosts file: Confirm the exact hostname has a 127.0.0.1 line, check for duplicate entries, and restart Edge after saving.
Blocking a site and clearing its stored data are separate actions. If a site has to stay reachable, manage what it stores rather than editing the hosts file.
Frequently Asked Questions
How do I block a specific website in Microsoft Edge on a computer?
Install a web-blocking extension and use its Block current site control, or add the domain to Edge’s Family Safety block list if that page is available in your profile.
Why is a blocked website still opening in Edge?
Check that the extension is enabled and the exact domain is in its blocked list, or that the Family Safety list contains the address. For a hosts-file rule, confirm the hostname is mapped correctly and reopen Edge after saving.
How do I unblock a website in Edge?
Use the extension’s unblock control, remove the domain from Block specific sites, or delete its hosts-file line. Reload or reopen Edge after changing the setting.
Does blocking a website on a computer also block it on mobile?
The extension and hosts-file changes apply only to the computer where you make them. Set up a separate restriction in Edge on Android or iPhone if you need it there.
Should I use a web-blocking extension or the hosts file?
Use an extension for a per-site, easy-to-undo restriction. Choose the hosts file only when you need the hostname blocked across browsers on the computer, because editing and undoing the rule are more involved.

Sir. David Killawee
Thank you, makes a job done
Hi, the extension Block Site works fine in so far as the tab opens and I get a message telling me the site has been blocked, but it is not a time saver, as I still have to close the tab that popped up. I want to interrupt the entire process and prevent the tab from opening in the first place, that way I can continue what I’m doing without interruption. Can I do this in Edge, or do I need to use a different browser altogether? If I remember correctly I used to be able to do this in IE.
Thank you
David Killawee