Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 331
  • Last Modified:

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.
0
amirinamdar
Asked:
amirinamdar
3 Solutions
 
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now