Do you want to prevent access to a website from your computer? If you want to use other browsers in addition to Mozilla Firefox such as Chrome, Internet Explorer or Edge e block access to sites from the PC, there is a way to do this without having to install third party software.
If you have a few minutes of free time I suggest you read this article because I will tell you about it how to block access to sites from the PC in a few simple steps. The solution is there and to apply it you don't necessarily have to be a computer expert, just follow what I'm about to tell you carefully.
The first thing to do is edit the file hosts of Windows that you will find in the path c: WindowsSystem32driversetc.
The function of the hosts file is to make browsing faster by storing the correspondence between IP addresses and domains. In this way it will not be necessary to query the DNS server, which normally takes care of this operation.
By eliminating one step, the connection will be much faster.
HOW TO BLOCK ACCESS TO THE SITES FROM THE PC
Open the file hosts and for block access to sites from the PC, start the program Block notes with administrative permissions.
Write Block notes or notepad in the Windows search bar and select the program with the right mouse button. From the menu that appears choose Run as administrator.
In the window apri, move to the folder . and sets All files (*. *). You will see several documents appear, including the file hosts. Open it and scroll to the end of the hashs (#). Enter the IP address 127.0.0.1 and the address of the site to be blocked.
For example 127.0.0.1 www.facebook.com.
Reboot the PC. In this way, every time a browser tries to access that site, the hosts file will send it to a local resource that does not exist.
To restore access to the blocked site, simply delete the added lines and save the hosts file again.
READ ALSO: How to block websites that open themselves on Android
In case you want redirect a website to another site, for example to Google, you can insert, always typing it in the hosts file, the IP address of Google and immediately after the web address of the site in question.
For example 22.214.171.124 www.facebook.com
READ ALSO: How to find out website IP address
HOW TO BLOCK ACCESS TO THE SITES FROM THE PC WITH HOSTMAN EDITOR
To avoid doing damage you can also use third party software such as HostMan Editor. It is a program with an elegant and intuitive interface that allows the management of the hosts file.
On the main screen the button Add, allows you to enter the sites you want to block. You just need to map them to the local host.
With HostMan Editor you can add, delete or deactivate any site, even the most potentially dangerous ones.
If, on the other hand, you want to block some sites from all devices that connect through a LAN, you have to act in the router settings. Depending on the model you have available, the item to be enabled changes. Generally you have to take a look under the menu URL Filtering.
HOW TO BLOCK ACCESS TO THE SITES FROM THE MAC
If you have a Mac, you can edit the hosts file on Mac OS X in two ways: app text Edit or through terminal.
To edit hosts file on Mac OS X you need to open Text Edit and go to the folder "private/etc/hosts". As with Windows, the hosts are also blocked on Mac OS X. You will need to make a copy for yourself.
To do this, right click on the original hosts and make a copy. Edit the file and save it by replacing the old hosts file with the new one.
The second method you can use to edit the hosts file on Mac OS X is through the Terminal. In the editor of the terminal finger nano /private/etc/hosts. Once the hosts file is open, edit it with the same information contained in the Windows hosts and press when finished CTRL + X to save and close the file.
In some cases you may be prompted for the root password, you can solve by typing sudo nano / private / etc / hosts file.