If you want to block / restrict a particular website or multiple websites on your computer just follow the below steps. This trick will is useful to block any websites which are surfing by your children or anyone in your house or company computers.
You can also block the software from validating the product key or license information form the software website.
Now Let us see how to block a website. Example: www.facebook.com
Read: 2 Ways To Rename Multiple Files And Folders In Windows
You can also block the software from validating the product key or license information form the software website.
Now Let us see how to block a website. Example: www.facebook.com
Read: 2 Ways To Rename Multiple Files And Folders In Windows
How To Block Websites Without Any Software
- Open My Computer and go to C:\Windows\System32\drivers\etc
- Open hosts file in notepad (Double Click To Open)
- Select Notepad in Open with Dialog.
- Text in the hosts file look like in below image.
- Below the 127.0.0.1 localhost
- ::1 localhost
- Enter websites in below format
- 127.0.0.1 www.SiteName.com
- To block facebook website add the below line to hosts file
- 127.0.0.1 www.facebook.com
- To block multiple websites Add website one after one in a new line in the below format
- 127.0.0.1 www.SiteName.com
- See the below image.
- Ctrl+s and save the hosts file.
- That's it open any browser try to open the website which you blocked. It will show the Unable to connect message.
- This works on all the browsers like Internet explorer, Firefox, Chrome, Opera, Safari,....etc
How To Unblock Website
- Simply Remove the line which you have added in hosts file.
this is not working
ReplyDeleteIn my system localhost is not there then how can I setup
ReplyDeletejust add website name to hosts file as i mentioned in the post. it will work.
Deletebhai ye work nhi kar raha h
DeleteThanks! Works pefectly. I am also a computer professinal, looking for this to stop me from accessing FB on PC & limit me to access only on Mobile to save my time. I have used my Xps viewer to take print of this page for future use only. Thanks again.
ReplyDeleteWOW.. this is just great and very informative but I also want to tell everyone if Facebook is blocked then they can access blocked website by using this link.
ReplyDeleteUnblock Facebook
If the kids are smart you can remove the www. as most sites allow you to access it without the www
ReplyDeletethanksssss....!!!!!!!!!
ReplyDeleteYou can also access any blocked site if you want. For that you just need to click on this link if you are willing to open any blocked site.
ReplyDeleteUnblock all Sites
good share...............the method describe here also works perfectly for me-http://www.superpctips.net/2012/05/how-to-block-website-in-windows-7.html
ReplyDeleteSuperb ! Your blog is incredible. I am delighted with it. Thanks for sharing with me.
ReplyDeletegood one what if it says access is denied to host folder
ReplyDeleteIt's Not Working Bro
ReplyDeletei am not able to make the save of the edidted file please any suggestion.
ReplyDeleteits not working...actually the file ccant b save in the name of host....so wt shld i do....
ReplyDeleteyou may copy paste the file on dekstop. then make the change. then save it on desktop. then cut it and paste and replace the original host file with this new one. it should work this way.
ReplyDeleteThis is all well and good, until Facebook redirects the request to SSL and then it's not blocked AND encrypted!
ReplyDeleteit block in all place or just my computer
ReplyDeletenot working if https:// is used
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeletewhen i try to save..
ReplyDeleteit says ..that i dont have the permission to do so..and asks if i want to save in another folder
hasn't worked for me either, i wasnt able to save so i did as anonymous suggested - (you may copy paste the file on dekstop. then make the change. then save it on desktop. then cut it and paste and replace the original host file with this new one. it should work this way.)
ReplyDeletehowever, even though the file has successfully changed and has the line of text with facebook on it, i can still access the website as normal. any ideas?
hey, this is the above commenter, i spoke too soon. has worked fine! thanks (unfortunately i cant delete the above comment)
ReplyDeleteSince it was opened as a text file, it wants to save as a text file. Then it won't let me access the folder.
ReplyDeleteAwesome.... jus incredible bro.... ur trick has jus solved my huge obstacle... hats off dude.... kep goin.. ;)
ReplyDeleteBro i got a prblm to save the file. its asking that ask permission to administrator
ReplyDeletemy window defender deleted it omg
ReplyDeletein my system local hosts is not there please help me
ReplyDeleteSorry Boss it is not working .i don't know where is the problem .
ReplyDelete