Block Websites of your choice without any Software

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

Advertisements

21 Responses

  1. Amazing…..how do you get all tis info dude? 🙂

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

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

  4. i dont have that 127.0.0.2 in my hosts file is something wit 192….

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

  6. […] Previously, I had written about HOSTS file in my post  Block Websites of your choice without any Software. […]

  7. how to work it i done it but still i can view the site i want to block the site

  8. did u try restarting the pc?

  9. yes but still i restart the computer how to it plzzzzzzzzzzzzz and yes i i’m running internet cafe i control everything from server

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

  11. i try it to block youtube but don’t work at all is there anytrick to it plzzzz help me my friend
    thank you

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

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

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

  15. […] 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/ […]

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

  17. 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,

  18. Thank you for the valuable information, keep going, thanks once again.

  19. Itz not working..!!! 😦

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

  21. i cant find the host file

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: