Here is a nice trick that you can use if you want to do some funs with your friends. This trick will block them from access any websites that you specify in the HOSTS file in Windows. But you only can do this trick if you can get access to his/her PC without he/she know. Let say when he/she leave the PC for awhile.
First thing that you need to do is to open HOSTS file which is located at
From there, open up the HOSTS file with notepad and put the sites URL that you wish to block. For an example, I want to block www.yahoo.com. What I do is to put this line
under the localhost like this:
Now what? Ok now go to the internet browser and try go to www.yahoo.com by typing the URL at the address bar. What you will get is the browser is unable to connect to www.yahoo.com. This is because the DNS for www.yahoo.com has been changed to 127.0.0.1 instead of the original www.yahoo.com DNS which is 18.104.22.168.
Extra note: Based from my experience, a virus can edit your HOSTS file and make you unable to connect to the antivirus websites such as www.kaspersky.com, www.symantec.com, etc. This purpose of it is to prevent you from do the definition update. In case this thing happens, what you should do is just remove all those lines and you are able to connect to the websites as usual.