Trying to ban a website by adding it to a special text file..

By tepeco
Sep 5, 2010
Post New Reply
  1. I have somehow lost my shortcut to a text file that is somewhere within the MS system or perhaps within the FIREFOX browser system. You add the address of the website to the list, give it a unique IP address from the others in the list and it keeps that website from coming up when someone tries to get to it.

    What is the name of that file and where can it be found???

    I hope this is enough information and that someone knows what I'm talking about.
  2. jmjsquared

    jmjsquared TS Booster Posts: 144

    Hosts File

    @tepeco, I think you are looking for the "Hosts" file, which, in a Windows installation, can be found here: C:\Windows\System32\Drivers\etc. The file itself has no extension.

    By-the-way, etc is the actual name of a folder.

    Hope this helps.
  3. tepeco

    tepeco TS Member Topic Starter Posts: 65

    Thank you! That is exactly what I was looking for.
    And I won't loose it again as I've added the information to my password book.
  4. jobeard

    jobeard TS Ambassador Posts: 9,342   +622


    The format is
    ipaddress <space character>
    and that file works TWO ways

    a) add the real IP address and you avoid the access to the DNS

    b) use AS the ip address for and
    all references to will be blocked.
  5. jmjsquared

    jmjsquared TS Booster Posts: 144

    @jobeard :
    -- Assuming one uses DNS caching, does adding real IP address speed up browsing? Significantly? What other benefits, if any?
    -- Can you alter Hosts file to permit access to, for example,, but restrict access to ?

  6. jobeard

    jobeard TS Ambassador Posts: 9,342   +622

    not a good idea. If the site in question goes down, you're stuck attempting a bougs address when the real system would have used the DNS to find another location.

    btw: the host file is loaded into the local DNS Client - - which is why this works :)
    every time you modify the etc\hosts file, you must
    • ipconfig /flushdns
    • net stop "dns client"
    • net start "dns client"
    the quotes must be used

    NO. the host file knows nothing of URLs. It contains IP addresses -> Domain.Names
  7. jmjsquared

    jmjsquared TS Booster Posts: 144

    Okay and Thanks. I almost got it but, then, what does adding the real IP address accomplish?
  8. jobeard

    jobeard TS Ambassador Posts: 9,342   +622

    it demonstrates HOW the name resolution works. On day-1 of TCP, this was THE resolution technique. Clearly it was limited and quickly lead to the development of DNS.

    Another use is on your personal LAN: if all systems can use MAC mapping to hand out IP addresses, (woking just like static but the admin is from the router),
    THEN you can give names to the systems, eg:
    • Huey
    • Dewey
    • Louie
    and you can get to the like \\Huey\sharedName
  9. jmjsquared

    jmjsquared TS Booster Posts: 144

    Got ya! :grinthumb I'm going to give that scheme a go on my home network.

    What? I've got the whole day to ask you how to fix it!

    Thanks again.
  10. tepeco

    tepeco TS Member Topic Starter Posts: 65

    Good contribution of information, jobeard.

Similar Topics

Add New Comment

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...