Although there are number of softwares which may help you to block any website any where but yet the best way is to do it without any software because its free, simple and most of all you are not dependent on any software. All you have to do is to edit windows HOSTS file to block a website. After website is blocked, you wont be able to access it in any web browser even by using any software.
The main purpose of HOSTS file is to maintain personal list of web addresses. Whenever you type want to open a website, its URL is first matched to the list in HOSTS file, if found you will be directed to that IP without first consulting a DNS [Domain Name Server]. We will use the this principle to redirect the URL you want to block to your router's adderess or any other website you want to open instead of that website.
Follow these simple steps:
- Open Windows->system32->drivers->etc or if your Windows is installed in C: drive simply type the following address in your address bar.
- Double click on hosts file and select notepad from the list.
- Now your hosts file would look like the screenshot below:
- Suppose i want to block a website with URL www.youtube.com and the IP addess of my router is 192.168.1.1, all you have to do is to add a new line to your hosts file, write the IP address of your router followed by the website you want to block. In our case, adding the following line to HOSTS file will do the work
- Now your hosts file would look like this:
- What we exactly did is that we redirected youtube.com to our router's configuration page. Remember you can also replace your router's IP addess with the IP address of any other website for example IP address of google.com. In that case when a person will try to open youtube.com, he will be redirected to Google.com.
- You can find Google.com IP address from using this command over your DOS
- Save HOSTS file [Ctrl+S].
- Restart your system.
I have tested this procedure on my PC. I was not able to open the website i blocked on Internet Explorer, Mozilla Firefox and Google Chrome. All of these three browsers opened the configuration page of my router whenever i tried to access the blocked website.Contact Us for News Tips, Corrections and Feedback