There are parental control software and by using it you can easily block any websites that you desire, but you have to pay for it. So by manually editing your host files you can block several websites, no worries we will guide you in easy steps.
A host file is a normal text file used by your OS (windows) to map host names and IP address. By using host file you can redirect a website to your local computer, in simple you can block any website that you wish. This topic is really more useful for parents who are concerned about their child’s online activities. Mainly used to block pornographic websites and note that this method is only for windows users.
How to block specific websites in all web browsers – Windows computer
- Go to c:/windows/System32/drivers/etc or simply run this textc:/windows/System32/drivers/etc from start menu. If it’s not c: then choose the appropriate drive where windows is installed.
- Now you will see a file called hosts, note that to edit this file you need to have administrator privileges. If you don’t have administrator privileges then you will simple end up seeing this window.
- Right click on the hosts file and click run as administrator. If you don’t see this option then click start and right click on notepad and then run as administrator.
- Now in notepad go to file >> open and then enter the following textc:windowsSystem32driversetchosts in file name filed and open.
- You will now see several lines in notepad and all that is used for mapping.
- Just after the final line that is #127.0.0.1 localhost # ::1 localhost enter the list of sites that you wish to block.
- Start with 127.0.0.1 leave a space and then add websites. You can enter list of websites each starting with WWW or non WWW or http://.
In the above line where 127.0.0.1 is the IP address for local host (local computer).
Other than adding domain names, you can block websites by using their IP address like this.
Tip: Go to who.is site, enter any website name and you can see its IP address in name servers area.
Save the hosts file when you are done and now go and open any browser (chrome, firefox, iexplorer) and check all those blocked websites. It simply shows a blank page.