I came across a fellow blogger today who wanted to know if there is any way to block a website without using Softwares. I was pretty amused to hear this and thought of putting it up as a blog for all the readers who are not aware of this age old trick.
 Lets assume that you want to block www.abc.com and www.def.com. In order to achieve this:Â
- Open the folder C:\WINDOWS\system32\drivers\etc.
- Look for the file HOSTS.
- Open the file HOSTS in your favorite Text Editor ( mine is Textpad)
- Under the line “127.0.0.1 localhost” add another line as “127.0.0.2 www.abc.com “.
- Similarly to block www.def.com add another line as “127.0.0.3 www.def.com “.
- Both the sites are now blocked. In case if you want to add more in your blocked websites list, just edit the list and add more.
So now you know what you gotta be doing with those annoying banner sites
Do share your views in comments.
Cheers,
Vaibhav
Filed under: Microsoft, Mozilla, POP 3, ProcessIdleTasks, SOA, Software, StarOffice, Sun, Technology, Tips, Tricks, Tutorials, Windows, YouTube, barcampbangalore4, block websites, hacking, launch, web


Amazing…..how do you get all tis info dude?
hi
i m very to read ur suggestion but can u tell in which extension should i save the file and can u tel me any software to hear the conversations of other person’ mobile on mine one………….???????plzzzzzzzzzzzz
Hi Rahul,
Thanks for reading the post.
The HOSTS file is already present, you dont need to create a new one. All you need to do is EDIT the already existing file.
Thanks
Vaibhav
i dont have that 127.0.0.2 in my hosts file is something wit 192….
hi sreyaasd
127.0.0.2 is not available in Hosts file by default. In case if you wish to block some website then only you should add that entry in the file. In short, you need to edit the file to add that entry. Its not available by default.
cheers,
Vaibhav
[...] Previously, I had written about HOSTS file in my post  Block Websites of your choice without any Software. [...]
how to work it i done it but still i can view the site i want to block the site
did u try restarting the pc?
yes but still i restart the computer how to it plzzzzzzzzzzzzz and yes i i’m running internet cafe i control everything from server
Hi Sailay
For this i would suggest you install some software which blocks the traffic. I am not sure if you control everything from the server using Hosts file trick.
Cheers,
Vaibhav
i try it to block youtube but don’t work at all is there anytrick to it plzzzz help me my friend
thank you
Hi Nader,
Websites like Youtube which are registered on multiple dynamic IP’s as well cant be blocked using this HOSTS file trick. I suggest you get some website blocker software for this.
-Vaibhav
For those of you wishing to block Youtube or other websites from your cyber cafe’s, i would suggest you go through this free tool at
http://www.k9webprotection.com/
Cheers,
Vaibhav
the language bar on my computer is last how should i found i tried but i didn’t find it i tried regional language setting but didn’t work help me
[...] Block Sify Group Site Pages on Login While using Sify BB, its group site pages keep opening on their own using precious RAM memory and annoying you. For how to block these websites: Lets assume that you want to block Home – ABC.com and Def.com – MP3 Resources and Information. This website is for sale!. In order to achieve this: § Open the folder C:WINDOWSsystem32driversetc. § Look for the file HOSTS. § Open the file HOSTS in your favorite Text Editor ( mine is Textpad) § Under the line “127.0.0.1 localhost” add another line as “127.0.0.2 Home – ABC.com “ § Similarly to block Def.com – MP3 Resources and Information. This website is for sale! add another line as “127.0.0.3 Def.com – MP3 Resources and Information. This website is for sale! “. § Both the sites are now blocked. In case if you want to add more in your blocked websites list, just edit the list and add more. So now you know what you gotta be doing with those annoying banner sites The above is extracted from: http://technofriends.in/2007/08/19/block-websites-of-your-choice-without-any-software/ [...]
Block Websites of your choice without any Software
Dated August 17, 2007
Dear Vaibhav Pandey:
How does one block websites of Sify Broadband’s Group sites opening on their own. Your method is not effective in this case. Pl do guide
Hi,
I have blocked the site using the above procedure. If i need to block internet access only in particular time?? how can i do that. ?
Kindly.. mail me.. regarding this.
Regards,
Thank you for the valuable information, keep going, thanks once again.
Itz not working..!!!
Hi Piyuu
Please refresh your DNS cache either by restarting your PC or by using a DSN Flush command. The browsers usually cache the DNS entry and therefore it takes quite sometime for the HOST File changes to reflect. Especially with Firefox this takes much longer.
Thanks
Vaibhav
i cant find the host file