1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

blocking a website

Discussion in 'Web & Email' started by Baktash, Feb 3, 2003.

Thread Status:
Not open for further replies.
Advertisement
  1. Baktash

    Baktash Thread Starter

    Joined:
    Jan 9, 2003
    Messages:
    77
    for some personal reason i want to block a website. But the problem is that if i add the website to the restricted sites in the explorer, the person who types the address of the site will know that it's added to the restricted sites. I want to block it in a such a way that the user think that there is some problem with the website or internet.
     
  2. Brooks

    Brooks Guest

    Joined:
    Oct 30, 2001
    Messages:
    2,323
    Try creating an entry in the hosts file directing the site to a non-existent page.

    Here is an example of the contents of the hosts file, redirecting yahoo to the local host ip address, which in IE will either have it do search for the site, or return a page cannot be found error (depends on how the options for IE are set).

    # Copyright (c) 1993-1999 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    # 102.54.94.97 rhino.acme.com # source server
    # 38.25.63.10 x.acme.com # x client host

    127.0.0.1 localhost
    127.0.0.1 yahoo.com
     
  3. Baktash

    Baktash Thread Starter

    Joined:
    Jan 9, 2003
    Messages:
    77
    but where can i find the "host file" actaully i dont know much about computers can you tell me in simple terms

    Thank you very much
     
  4. Brooks

    Brooks Guest

    Joined:
    Oct 30, 2001
    Messages:
    2,323
    Open up explorer and do a search for hosts on the C drive.

    Then open the file in notepad and edit it. Save the file and reboot the system.
     
  5. Brooks

    Brooks Guest

    Joined:
    Oct 30, 2001
    Messages:
    2,323
    I forgot to tell you that the hosts file does not have an extension, and is in a subfolder of your windows install directory.
     
  6. brendandonhu

    brendandonhu

    Joined:
    Jul 8, 2002
    Messages:
    14,681
    A search for hosts will return several results.
    You need the 1 in C:\Windows with no extension. Its file type will be "File", make sure it isnt hosts.sam you have.
    When you open it, it wont just open in Notepad, you will get a list of programs to open it with, choose Notepad and click open.

    At the end of the hosts file add this line

    0.0.0.0 website.com

    replacing website.com with the site you want to block.
    That will quickly return a 404 error. To make it look like its trying to access the page, then fail, use this line.

    127.0.0.1 website.com
     
  7. Baktash

    Baktash Thread Starter

    Joined:
    Jan 9, 2003
    Messages:
    77
    Oh its working perfect.I can't find the words to thank you. Thanks Thanks Thanks. You guys are so expert. Thanks alot.
     
  8. Balzac

    Balzac Guest

  9. brendandonhu

    brendandonhu

    Joined:
    Jul 8, 2002
    Messages:
    14,681
    [tsg=yourewelcome][/tsg]

    FYI-if someone tries to go to the site, they can get there by removing it from the hosts file, or by typing the IP address in directly.
     
  10. bigonexeon

    bigonexeon

    Joined:
    Feb 8, 2003
    Messages:
    1
    mmm host ahhh i think not as aol and any other preinstalled provider software only support it and on finishing my ccnp and mct its a new 1 on me
     
  11. brendandonhu

    brendandonhu

    Joined:
    Jul 8, 2002
    Messages:
    14,681
    HOSTS works on any windows system.
     
  12. mentorspet

    mentorspet

    Joined:
    Sep 3, 2003
    Messages:
    13
    I need help blocking a website.....I tryed searching for hosts but all i find is the hosts.sam
    someone please help!!
     
  13. brendandonhu

    brendandonhu

    Joined:
    Jul 8, 2002
    Messages:
    14,681
    Create one in Notepad.
     
  14. Bryan

    Bryan

    Joined:
    Jul 3, 1999
    Messages:
    11,943
    First Name:
    Bryan
    Or just copy Hosts.sam and name it Hosts with no extension. Then add the IP addresses as noted in previous postings.

    Or just rename Hosts.sam to just Hosts and then edit it with Notepad. You don't need a Hosts.sam file, it's just a sample template.
     
  15. mentorspet

    mentorspet

    Joined:
    Sep 3, 2003
    Messages:
    13
    it isn't working :(
     
  16. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/116808

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice