How to blacklist or block websites in Internet Explorer, Chrome, Firefox on Windows

There may be many reasons, you might want to ban, block or blacklist certain websites from being opened in a browser on your system. You might be an organization that does not want some websites to be opened in 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 browsers on a Windows 8.1 PC.

How to blacklist or block websites

How to blacklist or block websites

Using Proxy Script to block websites in IE and Chrome

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 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 also uses proxy settings from Internet Options, this will affect both Internet Explorer and Chrome.

However, this method is pretty restrictive and may not serve the purpose of many. There are other ways to block or blacklist websites in Internet Explorer, Firefox, Chrome and other browsers. Let us have a look at them.

Using HOSTS file to block individual websites

Hosts File is a temporary DNS cache that allows for 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.

Using Content Advisor in Internet Explorer

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

Using Restricted Zone in Internet Options

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

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 website too, but 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.

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 in Windows 8. 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 hundred percent reliable, but you still get to blacklist some of the websites based on the content rating. Yiu may also use some Free Parental Control Software.

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. 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.

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.

Posted by on , in Category Windows with Tags
Anand Khanse is the Admin of TheWindowsClub.com, a 10-year Microsoft MVP Awardee in Windows (2006-16) & a Windows Insider MVP. Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware.

12 Comments

  1. Andrey

    Obs: In Internet Explorer 11, the developers has disabled support for “file://” to proxy.pac scripts. Must we must host it on an HTTP server (IIS or APACHE).

  2. Saintjose

    Really great information, I this is the way to handle remotely we are blocking the website right…Good collection Interesting….

  3. Zepe

    You can also install the Firefox extension BlockSite.
    https://addons.mozilla.org/en-US/firefox/addon/blocksite/

  4. Kanuraj Anand

    The hosts file method does not seem to work while using a proxy connection..

  5. Karly Johnston

    The best option would be HOSTS but it doesn’t work.

  6. Karly Johnston

    It doesn’t work at all.

  7. David Rentzel

    After some extensive research, it appears that some programs can be blocked and some go through at will. I have tried host, windows firewall, and a 3rd party hosts editing program. None worked on the site I wanted blocked. It really pisses me off that I can’t have an option to have all applications ask me for permission to access the internet. Windows is a curse on us all!

  8. |:}

    I have a different rationale for wanting to block (AND NOT JUST MERELY BLOCK!) a website!… i.e., when a website den(ys) my access to its content by stealing my IP address, and then using this to BLACKLIST me! Then!… I want to be able to BLACKLIST such a site, from ITS USE of the Net!… AND NOT JUST FROM “MY” PC! And if “I” shouldn’t be allowed to use such a measure/ technoma, then I DEMAND that such a measure be invoked by a group M-A-N-D-A-T-E-D to do so!… AND THAT THE ICON FOR SUCH A GROUP, BE AFFIXED ON MY– AND EVERYONE ELSE’S!– RESPECTIVE PC’S TASKBAR!

    —–

    The technoma, and practice, discussed at Goog result, IP address blocking – Wikipedia, the free encyclopedia… poses a fundamental threat to a user’s Right to Access a given site!… to RESPONSIBLE AND CONSCIONABLE FREE EXPRESSION on a given site (HOWEVER POLITICALLY, AND/ OR SOCIALLY “PROBLEMATIC”!)!… and, thereby, to a user’s Digital and Human Rights!

    —–

    NO WEBSITE OWNER… NOR TECHNOMA IN THE CONTROL OF A SITE OWNER!… SHOULD BE ABLE TO CAPTURE AN IP ADDRESS OF A USER!… LET ALONE, TO USE SAME, TO BLOCK A USER FROM ACCESSING ONE’S SITE! AND USERS SHOULD BE MADE I-M-M-E-D-I-A-T-E-L-Y A-W-A-R-E OF WHO AND/ OR WHAT HAS MADE OFF WITH THEIR RESPECTIVE IP ADDRESS, THROUGH AN A-U-T-H-O-R-I-Z-E-D (I.E., A M-A-N-D-A-T-E-D!) T-R-A-N-S-P-A-R-E-N-T, R-E-A-L T-I-M-E, R-E-M-O-T-E, S-E-C-U-R-I-T-Y I-N-T-E-R-M-E-D-I-A-R-Y SITE INTERFACE TECHNOMA! AND!… AFTERUPON A USER’S CONFIRMATION OF WHO, AND/ OR WHAT HAS ABSCONDED WITH ONE’S IP ADDRESS, SUCH A NETIZEN SHOULD BE AFFORDED AN A-U-T-H-O-R-I-Z-E-D (I.E., A M-A-N-D-A-T-E-D!) T-R-A-N-S-P-A-R-E-N-T, R-E-A-L T-I-M-E, R-E-M-O-T-E, S-E-C-U-R-I-T-Y I-N-T-E-R-M-E-D-I-A-R-Y TECHNOMA/ MECHANISM, TO INTERVENE IN THE MITIGATION/ END OF A-N-Y A-N-D A-L-L R-E-A-L AND I-M-M-I-N-E-N-T THREATS TO A USER’S RESPECTIVE SITE ACCESS!… AND, RESULTANTLY, TO A NETIZEN’S DIGITAL AND HUMAN RIGHTS! FOR!… TO LEAVE THE INTERVENTION RE A SITE OWNER’S BREACHES IN THE HANDS OF RESPECTIVE NETIZENS WHO ARE POTENTIALLY ILL-EQUIPPED TO TACKLE THE TECHNOMA WITH WHICH USERS MAY BE CONFRONTED, IS TO–BY DEFAULT!– ENABLE THOSE MORE EQUIPPED, AND SKILLED, TO UNDERMINE THE WEBSITE ACCESS OF NETIZENS!… AND, THEIR RESPECTIVE DIGITAL AND HUMAN RIGHTS! FOR!… SOME OF THE BREACHES AGAINST USERS CURRENTLY IN PLAY, ARE BY WAY OF “PROFESSIONAL” NET P-L-A-Y-E-R-S!

    —–

    However!… if a holder of an IP address poses an I-L-L-E-G-A-L software/ hardware threat to a site, then the most appropriate security measure for a website owner, is to invoke an A-U-T-H-O-R-I-Z-E-D (I.E., A M-A-N-D-A-T-E-D!) T-R-A-N-S-P-A-R-E-N-T, R-E-A-L T-I-M-E, R-E-M-O-T-E, S-E-C-U-R-I-T-Y I-N-T-E-R-M-E-D-I-A-R-Y, AND MECHANISM, TO INTERVENE IN THE MITIGATION/ CESSATION OF A-N-Y A-N-D A-L-L R-E-A-L AND I-M-M-I-N-E-N-T THREATS TO ONE’S RESPECTIVE USER- ACCESSED SITE!… AND, TO ONE’S DIGITAL AND HUMAN RIGHTS! AND OWNERS SHOULD BE MADE I-M-M-E-D-I-A-T-E-L-Y A-W-A-R-E OF WHO AND/ OR WHAT HAS I-L-L-E-G-A-L-L-Y POSED A SOFTWARE/ HARDWARE THREAT TO ONE’S SITE, THROUGH THE APPROPRIATE REMOTE INTERMEDIARY’S WEBSITE INTERFACE TECHNOMA! FOR!… TO LEAVE THE INTERVENTION RE USER-BASED BREACHES IN THE HANDS OF RESPECTIVE SITE OWNERS, RATHER THAN AN A-U-T-H-O-R-I-Z-E-D I-N-T-E-R-M-E-D-I-A-R-Y, IS TO INVITE THE POTENTIAL ARBITRARY DENIAL OF WEBSITE ACCESS TO USERS!… AND, THEREBY, TO POTENTIAL VIOLATIONS OF THE DIGITAL AND HUMAN RIGHTS OF WEBSITE USERS!

    —–

    AND THUS!… AND TO CLOSE!… EVERY S.O.T.A. SECURITY MEASURE AVAILABLE MUST BE INVOKED, THAT WOULD PREVENT A USER’S IP ADDRESS FROM BEING STOLEN!… AND IN ORDER TO UPHOLD A USER’S FREE ACCESS TO PUBLIC SITES, AND TO PROTECT THE DIGITAL AND HUMAN RIGHTS AFFORDED NETIZENS! AND!… CONVERSELY!… EVERY SOTA SECURITY MEASURE AVAILABLE MUST BE INVOKED, THAT WOULD PROTECT AN OWNER’S SITE FROM A USER’S I-L-L-E-G-A-L R-E-A-L AND I-M-M-I-N-E-N-T THREATS TO OWNERS’ SITE OPERATIONS! AND!… IF THERE IS TO BE A-N-Y A-U-T-H-O-R-I-Z-E-D (I.E., M-A-N-D-A-T-E-D!) T-R-A-N-S-P-A-R-E-N-T, R-E-A-L T-I-M-E WEBSITE OWNER CONTROLLED, AND SITE-USER CONTROLLED O-F-F-T-H-E-S-H-E-L-F, S-T-A-N-D-A-L-O-N-E TECHNOMAE/ MECHANISMS TO INTERVENE IN THE MITIGATION/ END OF R-E-A-L AND I-M-M-I-N-E-N-T THREATS ON EITHER SIDE OF THE PROVERBIAL FENCE, THEN LET BOTH OWNERS AND USERS BE U-T-T-E-R-L-Y A-W-A-R-E OF THEIR RESPECTIVE (M-A-N-D-A-T-E-D) M-U-T-U-A-L O-B-L-I-G-A-T-I-O-N TO IMPLEMENT ONLY A-U-T-H-O-R-I-Z-E-D/ M-A-N-D-A-T-E-D TECHNOMAE/ MECHANISMS!… OR, SUCH SUFFER THE CIVIL AND/ OR CRIMINAL REPERCUSSIONS/ CONSEQUENCES OF THEIR USE OF A-N-Y A-N-D A-L-L U-N-A-U-T-H-O-R-I-Z-E-D TECHNOMAE/ MECHANISMS!… AND!… BY WAY OF THE TASKBAR ICON– AND AUTHORITY!– AS AFOREMENTIONED!

    —–

    Please!… no emails!

  9. Juan Figueroa

    How to block urls without http?

  10. Raghuveer Singh Rajput

    Hi can we block all url except two sites

  11. Raghuveer Singh Rajput

    can we block all sites except two URL.

Leave a Reply

Your email address will not be published. Required fields are marked *


3 + 6 =