Cannot block a site with 'hosts' file

Hi,
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 [127.0.0.1      blockedsite.com]. Curiously, I have entered the following in the hosts file and the site still opens in IE!

127.0.0.1     shaadi.com

Any ideas what might be wrong?
Any help will be appreciated.
LVL 8
amirinamdarAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jkrCommented:
You need to add the full name

127.0.0.1     www.shaadi.com
0
TheDefiantCommented:
As well as entering the full site name, you should also include any aliases or additional site names.

# IP               Site                            Comma-seperated aliases
127.0.0.1     www.blocked.com     mail.blocked.com,www2.blocked.com,anybody-out-there.blocked.com
0
KaliKoderCommented:
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!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

amirinamdarAuthor Commented:
jkr: I tried doing that too. No luck. Also, 'hotmail.com' rather than 'www.hotmail.com' 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 [www.shaadi.com] if it shows any aliases?
kalikoder: i m just trying it out. will let you know.
thanks for the help all of you.
0
TMWSIYCommented:
are you using the hosts file in %systemroot%\system32\drivers\etc\hosts?
0
amirinamdarAuthor Commented:
Thanks all for the help. I think the flushing of the dns resolver cache did the trick. However, I also did enter www.shaadi.com and http://www.shaadi.com in the hosts file block list.
Yes TMWSIY, I was referring to that hosts file only.
Thanks guys for the help!
Cheers!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows XP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.