Hi! Everyone, hope you all are fine.
Today in this post I will tell you how you can block any website using HOSTS file. If you have children in your home and they wasting a lot time on websites like Facebook, MySpace, Twitter, etc? Then you must be worried about them that they are spending a lot time on internet using Facebook, MySpace, Twitter, etc. So you can block those website you want very easily just by using a file called hosts.
![Protect Your Kids From Excessive Use Of Internet Protect Your Kids From Excessive Use Of Internet](https://i0.wp.com/jajodia-saket.sjbn.co/wp-content/uploads/2011/04/Protect-Your-Kids-From-Excessive-Use-Of-Internet.jpg?w=516&ssl=1)
Let me tell you how
- Go to Start button and select Run
- Type the below line in Run dialog box and press OK button
- Now a notepad will open
- Type the below line before the domain name of the website you want to block (one per line)
- Now save that file
- It may not get save directly
notepad %SystemRoot%\system32\drivers\etc\hosts
![Run dialog box Run dialog box](https://i0.wp.com/jajodia-saket.sjbn.co/wp-content/uploads/2011/04/Run-dialog-box.png?w=660&ssl=1)
127.0.0.1
For e.g.:
127.0.0.1 facebook.com
127.0.0.1 myspace.com
127.0.0.1 twitter.com
![HOSTS - 127.0.0.1 HOSTS - 127.0.0.1](https://i0.wp.com/jajodia-saket.sjbn.co/wp-content/uploads/2011/04/HOSTS-127.0.0.1.png?w=516&ssl=1)
After you added the websites you want to block, so now you need to save that file in a specific folder
- Press Ctrl+S
- Save as dialog box will open
- Navigate and save that file in your My Documents
- In Save as type select All Files (*.*)
- Now click on Save button
- Open My Documents
- Remove .txt extension from that file (if you can’t see then you can click here to know how you can view extension)
- Now again open Run dialog box (by going to Start button)
- Type below lone and press OK button
- A folder will open
- Now copy that hosts file from your My Documents folder
- And past it into that folder
- It will ask you to replace existing file, replace it
![Save as type select All Files Save as type select All Files](https://i0.wp.com/jajodia-saket.sjbn.co/wp-content/uploads/2011/04/Save-as-type-select-All-Files.png?w=516&ssl=1)
%SystemRoot%\system32\drivers\etc\
Hope this will help you in blocking any specific websites you want. if you have any questions or problem let me know.