Tuesday, June 21, 2011

How to block a website from all your web browser

  • Open command prompt by typing "cmd" without quotes in Run dialogue box (OR) Click start > All programs >Accessories > command prompt.
  • Now type exactly the command below (or) copy-paste the command without quotes and hit Enter: 
                 " notepad c:\windows\system32\drivers\etc\hosts "


  • A text file will be opened in notepad with name hosts.
  •  Locate the line " 127.0.0.1 Localhost " in the text file.
  • To block a website for example http://www.websitename.com, type the following text below the above line without quotes:
                 " 127.0.0.1 http://www.websitename.com "


  • You can add as many sites as u can, however u will need to prefix it with "127.0.0.1".
  • Now save the file and close the command prompt.
  • Now the above website will be blocked in all browsers in your computer.
  • If u wish to unblock any sites just delete these newly typed lines and save the file. 
Caution : Do not edit or delete any other lines in the hosts file other than the above specified.


No comments:

Post a Comment

Feel free to comment...

Livefyre