如何在 Chrome、Firefox、Edge 浏览器中将网站列入黑名单或阻止网站

如何在 Chrome、Firefox、Edge 浏览器中将网站列入黑名单或阻止网站

How to blacklist or block websites in Chrome, Firefox, Edge browsers

There may be many reasons, you might want to ban, block, or blackliѕt certain websites from being opened in a browser on your system. You might be an organizatiоn that does not want some websites to be opened in your organization’ѕ computers, or you may be a concerned parent who dоeѕ not want his or her kids to see disturbing content. The artіcle еxplains different methods to blacklist or block websites in browsers on a Windows 10 PC.

How to blacklist or block websites

1] Using Proxy Script to block websites in Chrome, Edge, IE

You can use a proxy script to block all websites except the ones belonging to 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 the websites of your organization. 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 Internet Explorer, Chrome, and Edge (Chromium). This post shows how to block a website in Microsoft Edge.

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, Internet Explorer and other browsers. Let us have a look at them.

Read: How to unblock and access Blocked or Restricted Websites.

2] Using HOSTS file to block individual websites

Hosts File is a temporary DNS cache that allows for a speedier opening 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 are now not able to access the websites that 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 so that users cannot access the mobile site.

3] Using Content Advisor in Internet Explorer

You can block individual websites or block websites by Category or Nature, using Content Advisor.

4] Using Restricted Zone in Internet Options

You can also block select website from opening by adding them to Restricted Zone in Internet Option.

5] Using OpenDNS to Blacklist Websites

The parental controls offered by OpenDNS are better than most other free DNS service providers. You just select the type of websites to be filtered and then, OpenDNS does the work for you. It might block some legitimate websites too, but it is worth using. Open DNS is both free and paid and while providing safe DNS resolutions, it also offers controls such as timings as to when the kids can use the computers.

6] Using Windows Parental Controls

The usage of parental controls via some DNS service is much better than a local one. That is why I talked about the parental controls of Open DNS above. You can also do the same using the Family Safety option. You will have to log into your kid’s profile and set up a rating system for the profile so that the child can access only the websites that seem eligible for that profile. You will have to repeat the same for other profiles of other kids. This method is not a hundred percent reliable, but you still get to blacklist some of the websites based on the content rating. You may also use some Free Parental Control Software.

7] Using PowerShell

You can also block an IP or a Website using PowerShell.

8] Using Add-ons and Extensions

If you are using Chrome 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.

Unfortunately, Internet Explorer does not have such add-ons but you might use Restricted Sites and Content Advisor in the Internet Options. These two, however, are not as effective as having a dedicated add-on for blacklisting or blocking websites on all browsers.

URL Blocker is another good free tool to help you block sites.

If you have any more ideas on the subject, please do share below, and I will update the post.

This post will help you if whitelist programs in Windows 10, for security reasons.

相关推荐

家乡的馓饭和下雪天更配,冬天来一碗,给肉都不换_手机网易网
剑侠情缘手游元宝获取途径分析 元宝多的用不完
外卖补单必备技巧(饿了么、美团通用)
英国世界杯夺冠几次?英格兰足球历史
365bet足球比

英国世界杯夺冠几次?英格兰足球历史

📅 10-05 👁️ 2734
权力的游戏集数列表
365bet足球比

权力的游戏集数列表

📅 07-22 👁️ 9125
从0到1教你如何练成蜜桃臀?(女生篇)
365bet足球比

从0到1教你如何练成蜜桃臀?(女生篇)

📅 06-29 👁️ 7012