How to block a website using the hosts file

You can use the below tool to create your own hosts file. This is a free, simple, quick way to block unwanted sites on your computer. Just enter the url(eg of the websites you want to block into the textbox below(One url per line). You should block both the www and non-www url’s (eg and

Websites to block:

Enter the url's you want to block here, then press the generate button. (One URL per line)

Common sites to block

Your custom hosts website block file

Download your new hosts file below, or copy and paste from the textbox below.
Download host file

Ok, I have my hosts file, now what?

You need to overwrite the old hosts file with the one you just downloaded. Because it is a system file you will need administrator privileges to overwrite this file.

I’m using Windows, Where is the hosts file?

The hosts file is located in your windows system directory. The easiest way to access it is as follows:

  1. Press Windows key + R
  2. type in “%systemroot%\system32\drivers\etc” (do not include the quotation marks “”)
  3. Copy the hosts file you just downloaded in to this folder (replace the old hosts file if prompted)

This method only allows you to block sites that you know about. If you want to protect your computer and family from harmful and other inappropriate content on the Internet you will need a professional software package.

I’m on Mac OS X, where is my hosts file?

  1. Open finder and go to /Applications/Utilities and open Terminal
  2. Type “sudo nano /etc/hosts” to open the hosts file (do not include the quotation marks “”)
  3. Paste the text from the output into the editor and press ctrl + o to save
  4. Press ctrl + x to exit the text editor

HELP! I need to unblock the websites I blocked

If you want to unblock the websites you blocked above follow these steps to remove the hosts file.

  1. Press Windows key + R
  2. type in “%systemroot%\system32\drivers\etc” (do not include the quotation marks “”)
  3. Right click on the hosts file and rename it. You should then be able to delete it.

Looking for a more advanced blocking method?

Buy Safe Eyes Parental Control Software

Safe Eyes Parental Control Software is one of the most popular website blocking tools. It’s perfect for keeping your family safe online. They are owned by Mcafee, one of the most respected companies in anti-virus software. Safe Eyes is a multi award winning product and for a limited time you can get it for %20 off if you enter the code: safeeyes20off

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS

Leave a Reply

WP Socializer Aakash Web