Cannot block a site with 'hosts' file

Posted on 2004-11-04
Last Modified: 2012-05-05
I am running WinXP Pro  SP2 on a desktop in a workgroup. I am using the hosts file method to block site access through my computer []. Curiously, I have entered the following in the hosts file and the site still opens in IE!

Any ideas what might be wrong?
Any help will be appreciated.
Question by:amirinamdar
    LVL 86

    Assisted Solution

    You need to add the full name
    LVL 1

    Assisted Solution

    As well as entering the full site name, you should also include any aliases or additional site names.

    # IP               Site                            Comma-seperated aliases,,
    LVL 11

    Accepted Solution

    Hello Amrindar,

    If you are still getting this, make sure you flush your DNS and/or reboot your machine after making this change.

    To flushDNS give the following command on a command prompt:

    "ipconfig /flushdns" (without quotes)

    Thanks and Good Luck!
    LVL 8

    Author Comment

    jkr: I tried doing that too. No luck. Also, '' rather than '' is still being blocked.
    thedefiant: That I did with another site which was showing a series of redirections; blocked all of them. Worked well for that site. But this site does not show any other aliases. Can you try and check that url [] if it shows any aliases?
    kalikoder: i m just trying it out. will let you know.
    thanks for the help all of you.
    LVL 6

    Expert Comment

    are you using the hosts file in %systemroot%\system32\drivers\etc\hosts?
    LVL 8

    Author Comment

    Thanks all for the help. I think the flushing of the dns resolver cache did the trick. However, I also did enter and in the hosts file block list.
    Yes TMWSIY, I was referring to that hosts file only.
    Thanks guys for the help!

    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    Most of the time we are in fix when all of sudden our systems behave weirdly.  Such problems cost time and effort... so it's best to take some preventive actions so that we can avoid such issues or overcome such problems more easily. Preventive M…
    Can you find a fax from a vendor you saved a decade ago in seconds? Have you ever cursed your PC under your breath during an audit because you couldn’t find the requested statement or driver history?  If you answered no to the first question or yes …
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now