Block ONE website?

Discussion in 'Windows Desktop Systems' started by forcer, May 8, 2008.

  1. forcer

    forcer OSNN Senior Addict

    Messages:
    413
    is it possible in windows to block access to ONE website?

    thanks
     
  2. binoyxj

    binoyxj PrOuD InDiAn

    Messages:
    475
    Location:
    KOCHI,KERALA,INDIA.
    Yes, it is a pretty simple task. You can use the Windows 'Hosts' file to accomplish this, here's how:

    In Windows XP, the hosts file is found here:

    C:\Windows\System32\Drivers\etc\hosts

    Once you have found the hosts file, right click it and select Properties. Uncheck the "Read-Only" attribute (if checked). Click OK.

    Double click the 'Hosts' file and select "Notepad" from the list of programs to open it with.

    Once you have the hosts file open in Notepad, you will see an entry such as:

    127.0.0.1 localhost

    To block a certain web page from loading, add the following:

    127.0.0.1 www.webpage.com

    Your Hosts file will now look like this:

    127.0.0.1 localhost
    127.0.0.1 www.webpage.com

    Add as many web addresses as you like in the same fashion.

    Once you are finished, go up to 'File' and click 'Save'.

    The web pages listed in your 'Hosts' file should be blocked from access. It may be necessary for you to reboot your computer for these changes to take effect.
     
    JPRuss likes this.
  3. JPRuss

    JPRuss OSNN Addict Folding Team

    Messages:
    77
    Location:
    In the unknown
    Hi,

    If you do not already have a hosts file, you might have to create it. The defalut file is hosts.sam, but you don't want to edit this file. If no file exists, you will have to create one called just hosts (not hosts.txt)

    After following binoyxj steps above, you can then run the command nbtstat -R which will flush any cache and re-read the hosts file

    This is a pretty neat little hack to block access to a site. Although if someone knows how the host file works it can be easily be bypassed.

    I would suggest making the change at your router level (password protected) which would make it harder to get around. Some routers have a "parental controls" option that allows you to setup a block list. Or otherwise, you add a firewall rule to prevent packets from passing to the specified IP address.
     
  4. binoyxj

    binoyxj PrOuD InDiAn

    Messages:
    475
    Location:
    KOCHI,KERALA,INDIA.
    In Internet Explorer.

    Goto - Tools - Internet Options - Security - Click restricted sites.

    Click the sites button and add the sites you want to block with the URL Name
     
  5. forcer

    forcer OSNN Senior Addict

    Messages:
    413
    thanks i'll try them out when i get home
     
  6. unknownsoul

    unknownsoul Moderator

    Messages:
    601
    Location:
    Fort Worth, Texas
    The hosts file is a great suggestion, but like y'all said, it can be easily bypassed.
    The IE option is good as well, and can be undone in a moment or two.
    The router is definately the best way to go. Make sure and change the username and password of the router to something other than the default.
     
  7. binoyxj

    binoyxj PrOuD InDiAn

    Messages:
    475
    Location:
    KOCHI,KERALA,INDIA.
    Sure setting router for filtering sites is the best solution if one knows it...........