It is possible that you, as a responsible parent (and maybe for other reasons), have a need to block the site or several sites from being viewed in a browser on your home computer or on other devices.
This guide will discuss several ways to block this, while some of them are less effective and allow you to block access to sites on only one specific computer or laptop, another of the described features provides much more options: for example, you can block certain sites for all devices connected to your Wi-Fi router, whether it’s a phone, tablet or something else. The described methods allow you to make sure that the selected sites do not open in Windows 10, 8 and Windows 7.
Note: one of the easiest ways to block sites that requires, however, the creation of a separate account on the computer (for a controlled user) is the built-in parental control function. They not only allow you to block sites so that they do not open, but also launch programs, as well as limit the time you use your computer. Read more: Parental Control Windows 10 , Parental Control Windows 8
Simple blocking of the site in all browsers by editing the hosts file
When you have Odnoklassniki or Vkontakte blocked and do not open, it is most likely a virus that makes changes to the hosts system file. We can manually make changes to this file to prevent the opening of certain sites. Here's how to do it.
- Run the notepad program as administrator. In Windows 10, this can be done through a search (in the search on the taskbar) for a notebook and subsequent right-click on it. In Windows 7, find it in the start menu, right-click on it and select "Run as administrator". In Windows 8, on the initial screen, start typing the word "Notepad" (just start typing, in any field, it will appear itself). When you see a list in which the necessary program will be found, right-click on it and select "Run as administrator".
- In Notepad, select File - Open from the menu, go to the C: \ Windows \ System32 \ drivers \ etc folder , put a display of all the files in Notepad and open the hosts file (the one without extension).
- The contents of the file will look something like the image below.
- Add lines for sites that you want to block with the address 127.0.0.1 and the usual alphabetic address of the site without http. In this case, after saving the hosts file, this site will not open. Instead of 127.0.0.1, you can use the IP addresses of other sites known to you (there must be at least one space between the IP address and the alphabetic URL). See picture with explanations and examples. Update 2016: it is better to create two lines for each site - with www and without.
- Save the file and restart the computer.
Thus, you managed to block access to certain sites. But this method has some drawbacks: firstly, a person who has at least once encountered such a lock will start checking the hosts file first, even I have a few instructions on my site to solve this problem. Secondly, this method only works for computers with Windows (in fact, there is an analogue of hosts in Mac OS X and Linux, but I will not touch on this as part of this instruction). More details: The hosts file in Windows 10 (suitable for previous versions of the OS).
How to block a site in the Windows firewall
The built-in "Windows Firewall" firewall in Windows 10, 8 and Windows 7 also allows you to block individual sites, though it does so by the IP address (which may change for the site over time).
The locking process will look like this:
- Open a command prompt and enter ping site_address then press Enter. Record the IP address with which packets are exchanged.
- Launch the Windows firewall in high security mode (you can use Windows 10 and 8 search to start, and in 7-ke - Control Panel - Windows Firewall - Advanced settings).
- Select the "Rules for outgoing connection" and click "Create rule."
- Specify Custom
- In the next window, select "All Programs."
- In the Protocol and Ports window, do not change the settings.
- In the "Scope" window, in the "Specify the remote IP addresses to which the rule applies" section, select "Specified IP addresses", then click "Add" and add the IP address of the site that you want to block.
- In the "Action" window, select "Block connection."
- In the Profile window, leave all items checked.
- In the "Name" window, name your rule (name of your choice).
That's all: save the rule and now the Windows Firewall will block the site by IP address when you try to open it.
Blocking a site in Google Chrome
Here we’ll look at how to block a site in Google Chrome, although this method is suitable for other browsers with support for extensions. The Chrome Store has a special Block Site extension for this purpose.
After installing the extension, you can access its settings by right-clicking anywhere on the open page in Google Chrome, all settings are in Russian and contain the following options:
- Blocking the site at (and redirecting to any other site when trying to enter the specified one.
- Blocking words (if the word appears in the address of the site, it will be blocked).
- Blocking by time and days of the week.
- Setting a password to change the lock settings (in the "remove protection" section).
- The ability to enable site blocking in incognito mode.
All of these options are available for free. From what is offered in the premium account - protection against removing the extension.
Download Block Site to block sites in Chrome you can on the official extension page
Blocking unwanted sites using Yandex.DNS
Yandex provides a free Yandex.DNS service that allows you to protect children from unwanted sites by automatically blocking all sites that may be undesirable for the child, as well as fraudulent sites and resources with viruses.
Setting up Yandex.DNS is simple.
- Go to the site https://dns.yandex.ru
- Choose a mode (for example, family), do not close the browser window (you will need addresses from it).
- Press the Win + R keys on the keyboard (where Win is the key with the Windows logo), type ncpa.cpl and press Enter.
- In the window with the list of network connections, right-click on your Internet connection and select "Properties".
- In the next window, with a list of network protocols, select IP version 4 (TCP / IPv4) and click "Properties".
- In the fields for entering the DNS server address, enter Yandex.DNS values for the mode you selected.
Save the settings. Now unwanted sites will be blocked automatically in all browsers, and you will receive a notification about the reason for blocking. There is a similar paid service - skydns.ru, which also allows you to configure which sites you want to block and control access to various resources.
How to block access to the site using OpenDNS
OpenDNS service, free for personal use, allows not only blocking sites, but also much more. But we will touch on access blocking using OpenDNS. The instructions below require some experience, as well as understanding how this works and is not suitable for beginners, so if in doubt, don’t know how to set up a simple Internet on your own computer, better not take it.
To get started, you will need to register with OpenDNS Home to use the filter for unwanted sites for free. You can do this at http://www.opendns.com/home-solutions/parental-controls/
After entering the registration information, such as email address and password, you will be taken to a page of this type:
It contains links to English-language instructions for changing DNS (which is exactly what you need to block sites) on a computer, Wi-Fi router or DNS server (the latter is more suitable for organizations). You can read the instructions on the site, but briefly and in Russian I will give this information here. (The instructions on the site still need to be opened, without it you will not be able to proceed to the next paragraph).
To change the DNS on one computer , in Windows 7 and Windows 8, go to the network and sharing control center, select "Change adapter settings" in the list on the left. Then right-click on the connection used to access the Internet and select "Properties". Then, in the list of connection components, select TCP / IPv4, click "Properties" and specify the DNS specified on the OpenDNS website: 220.127.116.11 and 18.104.22.168, then click "OK".
Specify the provided DNS in the connection settings
In addition, it is advisable to clear the DNS cache. To do this, run the command line as administrator and enter the ipconfig / flushdns command.
For the DNS changes to the router and the subsequent blocking of sites for all devices connected to the Internet by means of it, register the specified DNS server to configure the WAN connection and if your ISP uses dynamic IP-address, set OpenDNS Updater program (will be offered later) on the computer that is most often turned on and always connected to the Internet through this router.
We indicate the name of the network at our discretion and download OpenDNS Updater, if necessary
On it is ready. On the OpenDNS website, you can go to the “Test your new settings” item to check if everything was done correctly. If everything is in order, you will see a success message and a link to go to the OpenDNS Dashboard admin panel.
First of all, in the console, you will need to specify the IP address to which further settings will be applied. If your provider uses a dynamic IP address, then you will need to install the program, available via the client-side software link, and also offered when assigning a network name (next step), it will send data about the current IP address of your computer or network, if using a Wi-Fi router. At the next stage, you will need to set the name of the “controlled” network - any, at your discretion (the screenshot was above).
Indicate which sites to block in OpenDNS
After the network is added, it will appear in the list - click on the IP address of the network to open the blocking settings. You can set pre-prepared filtering levels, as well as block any sites in the Manage individual domains section. Just enter the domain address, select Always block and click the Add Domain button (you will also be asked to block not only, for example, odnoklassniki.ru, but also all social networks).
The site is blocked.
After adding a domain to the block list, you also need to click the Apply button and wait a few minutes until the changes take effect on all OpenDNS servers. Well, after all the changes come into force, when you try to access a blocked site, you will see a message that the site is blocked on this network and a proposal to contact the system administrator.
Web content filter in antivirus and third-party programs
Many well-known anti-virus products have built-in parental control functions, with which you can block unwanted sites. In most of them, the inclusion of these functions and their management are intuitive and not difficult. Also, the ability to block individual IP addresses is in the settings of most Wi-Fi routers.
In addition, there are separate software products, both paid and free, with which you can set the appropriate restrictions, including Norton Family, Net Nanny and many others. As a rule, they provide a lock on a specific computer and can be removed by entering a password, although there are other implementations.
Somehow I will write more about such programs, and this is the time to complete this guide. Hope it will be helpful.