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.
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
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
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
%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.