How to Use Host Files to Block Websites

How to Use Host Files to Block Websites thumbnail
Keep your computer secure by using the HOST file.

The HOSTS file maps a local IP address to a remote host. Users can assign a local IP to a remote address to essentially block a remote connection to that specific address. The benefits of using the host file amount to enhanced security by preventing users on your computer connecting to unwanted or potentially malicious websites.

Instructions

    • 1

      If you're using Windows XP: Click "Start" and go to "My Computer."

      In Windows Vista/7: Click "Start" and go to "Computer."

    • 2

      Navigate to "C:\Windows\System32\Drivers\etc"

      Within the "Etc" folder, look for a file called "HOSTS."

    • 3

      In Windows XP: Right-click on the file, select "Open With" and choose "Notepad."

      In Windows Vista/7: Right-click on the file, select "Open" and choose "Notepad."

    • 4

      For Windows XP: Look at the line "127.0.0.1 localhost." This line is telling your computer that 127.0.0.1 is a local IP address. Any additions you wish to make will be below that line.

      Windows Vista/7: In addition to the above information, also look at the "#" symbols. The "#" symbols are considered comments and are not recognized by the operating system. By default, there is a comment symbol next to "127.0.0.1 localhost." This is because Windows is using DNS by default for local resolution instead of the HOSTS file. Remove the "#" symbol next to 127.0.0.1 localhost." This removes it as a comment and activates it for use. Any additions you would like to make will be below that line.

    • 5

      Type using the following format for all the websites you would like to block:

      127.0.0.1 unwantedsite.com Where "unwantedsite" is the actual unwanted site you want to block.

      Note: You should not add in the "http or www" prefixes.

    • 6

      Press "Ctrl + S" when finished adding the sites you would like to block to save your changes.

    • 7

      Restart your computer to ensure changes take effect. The website will be blocked the next time you try to load it.

Related Searches:

References

  • Photo Credit man thinking about internet security image by patrimonio designs from Fotolia.com

Comments

You May Also Like

Related Ads

Featured