How to Block Websites from Opening in Windows

A website is a collection of related network web resources such as web pages and multimedia content, which are typically identified with a common domain name and published on at least one web server. Sometimes, you might need to block certain websites; for example, to configure the computer for office use or restrict some websites for your home use. Therefore, in this article, we will teach you how to block websites on Windows 10.

Blocking websites on Windows 10
How to block websites on Windows 10

How to Block Websites from Opening on Windows 10?

When it comes to blocking sites on Windows 10, there are numerous ways of doing that. Mostly, you can search them through browsers, so you can block them on the browser that is being used. Also, our systems have a hosts file that you can use to block any site you want by editing it and adding the web address. We will discuss all the possible methods on how to block sites in different browsers or by using your system hosts file.

Method 1: Block Websites through Hosts File

In this method, we will be editing the hosts file in our system directory and adding the website’s address to the file to block them. Make sure you have permission to access the hosts file and always open it as an administrator on the notepad for editing.

  1. Open your “Notepad” as an administrator. Press Windows + S, type “notepad” in the dialog box, right-click on the application, and select Run as administrator.
    Opening Notepad as administrator
    Opening Notepad as administrator
  2. Click “File” and then “Open”.
  3. Go to the following address:
    C:\Windows\System32\Drivers\etc\hosts
  4. Locate the “hosts” file and open it.
    Opening hosts file in the system directory
    Opening hosts file in the system directory
  5. Scroll down to the bottom and click on the line after the last item.
    Note: You can create space between the last line and the one you are typing, just to be safe.
  6. Type your localhost IP and URL/Address for websites:
    127.0.0.1    www.facebook.com
    Adding websites to block in the hosts file
    Adding websites to block in the hosts file

    Note: Use the tab for the space between the IP and the address. The IP will remain the same for every web address you add because it is your localhost IP, but only the website URL will change each time.

  7. Click File, then Save.
  8. Now try; the website will be blocked.
    Note: You may need to restart your PC for it to work.

Method 2: Block Websites in Firefox

Firefox has some add-ons that allow you to block websites by adding their URL. You can get these add-ons for free, and they have a lot of features, like a password for unblocking the sites, work mode, and block by words. To add the add-ons, follow the steps below:

  1. Open Mozilla Firefox.
  2. Click on the “Settings Bar” on the top right corner.
  3. Select Add-ons (Shortcut – Ctrl + Shift + A).
  4. Search for “Block Site” in the search box.
    Adding add-ons on Firefox browser
    Adding add-ons on Firefox browser
  5. Open the one that has more users and click “Add to Firefox”.
    Adding to Firefox
    Adding to Firefox
  6. Add any web address in it, and that will block it for Firefox.
    Adding sites to block in Block Site add-on
    Adding sites to block in Block Site add-on
  7. You can also add a Password to your settings by selecting it on the left-side panel. This will protect the blocked sites, so no one can unblock them back.
    Password feature for Block Site
    Password feature for Block Site

Method 3: Block Websites in Chrome

Please click here to view the method on how to block a website in Chrome.

Method 4: Block Websites in Edge

Microsoft Edge or Internet Explorer has an option for blocking sites, and it’s available in the Internet properties. You can restrict sites through this feature available in the security tab of properties and add a site manually by its URL.

  1. Open Run by pressing (Windows + R) buttons on a keyboard.
  2. Type “inetcpl.cpl” in the text box, and press Enter.
    Opening Internet properties through Run
    Opening Internet properties through Run
  3. A window will pop up for Internet Properties. Select the Security tab in the properties.
  4. Select the “Restricted Sites” zone and click on “Sites”.
    Selecting a restricted site in the security tab
    Selecting a restricted site in the security tab
  5. Add any website that you want to block, press Add, and then close and save it.
    Adding website to block in Edge
    Adding website to block in Edge
ABOUT THE AUTHOR

Kevin Arrows


Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.