Sunday, July 15, 2012

How To Block A Website In Computer Using Windows Host File


Hi guys..
Today i am going to tell you about blocking websites in your computer. By this method you can block a site in your PC.
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi53WGGZFkkaG7L_S0GnHjM3mdv8mewstNJDHgqvcKbB6l11fl5VqLG-sTgu40STvXFvhozY3GkGifI6GjDdH-vM5ZyNMSj5i2MsTi9fY-xj5d3N9M4czIzMO3AtUf9lyn_tlnbnCjk1q4/s1600/block_website.jpg
So without wasting time lets start the procedure.

Step 1 – Open Notepad

For windows xp users : Open Notepad
For windows vista/seven users : Open notepad as administrator. (just right click on the notepad icon and select  run as administrator option.)

Step 2 – Open Windows Hosts File

Click on File in note\pad then select Open. After that browse the location
C:\windows\system32\drivers\etc
Here C:\ is the drive in which windows is installed. In the folder there will a file named hosts . Open this file

Step 3 – Edit Hosts File To Block Websites

Now scroll to the end of this file, add the following lines and save it.

127.0.0.1 websitetoblock.com
127.0.0.1 www.websitetoblock.com


Dev Hacking


Replace websitetoblock with the website which you want to block in Your PC. What these lines do it whenever someone tries to access the website you specified windows hosts file will redirect it to 127.0.0.1 i.e. localhost or the local ip of computer system. This results in a server not found error as there is no server located at  localhost. Also, we need to block both the versions of the website i.e with www and without www. If we block only one version then website will be accessible from other version.
In this way you can block a website from your computer so that no one can access it.
Please submit your comments below. Thank you. :)

0 comments:

Post a Comment