how to block websites from windows

  How to block websites in windows an linux

To block a specific website, all you have to do is just add a new entry for that site in the hosts file
Few steps:-

Windows: In case of the Windows operating system, the hosts file is located at:

In most cases this should be:
Unix/Linux: In case of Linux it is located at:

1.Go to “My Computer” and you should see the “Menu bar” on top. In case of Vista and Win 7, just click “Alt” to unhide the “Menu bar”

2.Now in the menu bar,
tools-> Folder Options”. In the “View” tabuncheck the option that says: 
“Hide extensions for known file types” and click on “OK”

3.Open a new text pad (New Text Document.txt) and rename it to: hosts. You will get a pop-up message with a warning. Just click on “Yes”.

4.Open the hosts file using the notepad.
 Now let us assume that you want to block the sites Facebook and Youtube 
on your computer. For this all you have to do is add the following lines to your 
hosts file:
Each entry should be placed on an individual line. The IP address and the hostname should be separated by a space or a tab. In this way, you can block any given website by just pointing it to the IP address
Navigate to %systemroot% -> system32 -> drivers -> etc. Here you should see the original hosts file, rename it to hosts_bak. Just copy and paste the new hosts file that you have created

That’s it. You’ve now successfully blocked those websites from loading on your computer.


No comments:

Post a Comment