For many reasons, you might want to block or blacklist certain websites from opening in your browser on your system. You might be an organization that does not want some websites to be opened on your organization’s computers, or you may be a concerned parent who does not want his or her kids to see disturbing content. The article explains different methods to blacklist or block websites in Chrome, Edge, Firefox, etc. browsers on a Windows 11/10 PC.
How to block websites in Chrome, Edge, Firefox on Windows 11

1] Using Proxy Script to block websites in Chrome or Edge
You can use a proxy script to block all websites except those in your organization. In effect, you are whitelisting one site here, and blocking out the others. I found a script at berkeley.edu, which does this:
function FindProxyForURL(url, host) { // Bypass the proxy for *.thewindowsclub.com if (dnsDomainIs(host, ".thewindowsclub.com")) { return "DIRECT"; } return "PROXY http://127.0.0.1:18080"; } // End of function
If you copy the above script to Notepad and save it as a .pac file, you will be able to open websites related only to TheWindowsClub.com, main blog site, news, and forum. If you try to open any other website, you will receive a warning and the site will not open. You can change the site name to your organization’s website so that users of your organization can access only your organization’s websites. That will be the main website and all the subdomains of your organization.
You have to configure it using Internet Options in Control Panel. In the Connections tab, click on LAN settings. Uncheck “Automatically Detect Settings”. Click to check the box named “Use automatic configuration script”.
In the address field, type the location of .pac file as following:
File://C:/Path/script.pac
File:// remains the same while path and filename may vary based upon where you saved the file and what you named the file. Note that we used forward slashes instead of backslashes as in the case of Internet URLs.
Since Chrome and Edge also use proxy settings from Internet Options, this will affect both Chrome, and Edge (Chromium).
However, this method is pretty restrictive and may not serve the purpose of many. There are other ways to block or blacklist websites in Edge, Firefox, Chrome, and other browsers. Let us have a look at them.
TIP: This post shows how to block a website in Microsoft Edge using three methods.
2] Using HOSTS file to block individual websites
The Hosts File is a temporary DNS cache that allows for faster loading of websites. You can use this file to reject individual websites. The Hosts file in Windows is located at the following location:
C:\Windows\System32\drivers\etc
You will have to edit the Hosts File. Right-click on the file and use Notepad to open the file. For each website you wish to blacklist, add a new line, and create an entry in the following format:
127.0.0.1 website.com
Save the file and close it. You will find that you can no longer access the websites you added to the HOSTS file using the above format.
Make sure you use variations of the websites so that others cannot get in using the variations. For example, if you block facebook.com, you will also want to block m.facebook.com to prevent users from accessing the mobile site.
Read: How to unblock and access Blocked or Restricted Websites.
3] Using Restricted Zone in Internet Options
You can also block select website from opening by adding them to Restricted Zone in Internet Option.
4] Using OpenDNS to Blacklist Websites
The parental controls offered by OpenDNS are better than most other free DNS service providers. You just select the types of websites to filter, and then OpenDNS does the work for you. It might block some legitimate websites too, but it is worth using. OpenDNS is both free and paid, and while providing safe DNS resolution, it also offers controls, such as timing, for when the kids can use the computers.
Read: How to block Adult websites using DNS Services in Windows.
5] Using Windows Parental Controls
Using parental controls via a DNS service is much better than using a local one. That is why I talked about Open DNS’s parental controls above. You can also do the same using the Family Safety option. You will have to log in to your kid’s profile and set up a rating system so the child can access only websites that are eligible for that profile. You will have to repeat the same for other kids’ profiles. This method is not 100% reliable, but you can still blacklist some websites based on their content rating. You may also use some Free Parental Control Software.
6] Using PowerShell
You can also block an IP or a Website using PowerShell.
7] Using Add-ons and Extensions
If you are using Chrome, Edge and Firefox, you can get extensions that blacklist websites for you. You can also set up passwords in the extensions so that others do not change the settings. Some such extensions are BlockSite and Whitelist for Chrome. You can use these Chrome extensions on the new Edge as well. Firefox users can check out BlockSite or Minimal Site Block.
If you have any more ideas on the subject, please do share below, and I will update the post.
This post will help you whitelist programs in Windows, for security reasons.