How to block a site?

It is quite possible that you, as a responsible parent (or maybe for some other reasons), need to block a site or several sites from being viewed in a browser on some of your PCs. We have already had an article about blocking youtube on your router, but let’s take a look at how to block a webpage on a particular PC. So here are our options.



Simple website blocking in all browsers by editing the hosts file

Some of the viruses tend to block access to the websites or substitute the real files with the fake ones by making changes to hosts file on a PC. However, it’s totally legit to use the same approach for our means – to block an unwanted website. Here’s how to do it.

  1. Run the Notepad as an administrator. This can be done through the search. When you find Notepad, right-click on it and select “Run as administrator”.

How to block a site 01.jpg — How to block a site?

2. In Notepad, select File – Open in the menu, go to the folder C: \ Windows \ System32 \ drivers \ etc. Find and open the hosts file (the one without an extension).

How to block a site 02 — How to block a site?

3. The contents of the file will look similar to the image below.

 

How to block a site 03 — How to block a site?

    4. Now we need to type those sites down that need to be blocked with their IP address and the usual literal address of the site without http. In this case, after saving the hosts file, this site will not be opened. Furthermore, there must be at least one space between the IP address and the alphabetic URL.

How to block a site 04 — How to block a site?

    5. Save the file and restart the computer.



 

How to block a site in Windows Firewall

The built-in “Windows Firewall” allows you to block sites by their IP address (which can change over time). The blocking process will be as follows:

  1. Open a command prompt and type ping site_address and then press Enter. Record the IP address which you have received.

 

How to block a site 05 — How to block a site?

   2. Run Windows Firewall in advanced security.

How to block a site 06 — How to block a site?

   3. Select Outbound Rules and click New Rule

How to block a site 07 — How to block a site?

   4. Select Custom

How to block a site 08 — How to block a site?

   5. In the next window, select All Programs.

How to block a site 09 — How to block a site?

6. Do not change anything in the window Protocol and Ports

   7. In the Scope window in the “Which remote IP addresses does this rule apply to” tick the item “These IP addresses”, then click “Add” and add the IP address of the site you want to block.

How to block a site 10 — How to block a site?

8. Then click Next and choose Block the connection

How to block a site 11 — How to block a site?

9. In the Profile window, leave all the items checked.

That’s all: save the rule and now Windows Firewall will block the site by IP address when you try to open it.



 

Filter for web content in antivirus and third-party programs

Many well-known anti-virus products have built-in parental control that allows you to block unwanted sites. Most of them have an intuitive interface and do not cause difficulties when trying to turn these functions on.

In addition, there are separate software products, both paid and free, which you can use to set appropriate restrictions, among which are Norton Family, Net Nanny, and many others. As a rule, they provide locking on a specific PC and you can remove it by entering a password, although there are other implementations.

 

Keep reading

Related articles

Work with HiTech

Need a team that can do this for you?

Software development, quality assurance, managed services and compliance work, delivered by the HiTech Service team.