Reply
Old December 6th, 2005 Top | #1
 
muzikool's Avatar
Act your wage.
Joined: December 2001
Location: Texas, USA Reputation: Yes, please.
Posts: 7,626
Reputation: 2900
Power: 232

Default HOSTS file not being read

I've got entries in my HOSTS file that resolve NETBIOS names on the network here. I can't ping the names but I can ping the IP addresses. Also, the sites I have blocked (going to localhost) are loading fine in my browser. So, I've determined that the HOSTS file is not being read for some reason.

Things I've tried:

*Rebooting
*releasing and renewing my IP
*flushing the DNS cache

Any ideas?

muzikool is offline   Reply With Quote
Old December 6th, 2005 Top | #2

OSNN Folding Team  
kcnychief's Avatar
█▄█ ▀█▄ █
Joined: April 2005
Location: Massachusetts
Posts: 16,949
Reputation: 4941
Power: 305

Default Re: HOSTS file not being read

Stand alone machine, or part of a network?

When did this start happening?
kcnychief is offline   Reply With Quote
Old December 6th, 2005 Top | #3
 
muzikool's Avatar
Act your wage.
Joined: December 2001
Location: Texas, USA Reputation: Yes, please.
Posts: 7,626
Reputation: 2900
Power: 232

Default Re: HOSTS file not being read

Part of a network (at work).

It happened after I cleared the HOSTS file (to only localhost) to test some things. I then put the original HOSTS file back in, and since then I've had trouble.

The MS KB suggested the same things I've already tried.

muzikool is offline   Reply With Quote
Old December 6th, 2005 Top | #4
 
Mastershakes's Avatar
OSNN Veteran Addict
Joined: July 2004
Location: Montreal
Posts: 1,721
Reputation: 1040
Power: 124

Default Re: HOSTS file not being read

Is it known as hosts.txt or hosts?

Go to cmd prompt, make sure.

type in this, if it gives no errors, your host file should start working again.

rename hosts.txt hosts (press enter)
Mastershakes is offline   Reply With Quote
Old December 6th, 2005 Top | #5
 
muzikool's Avatar
Act your wage.
Joined: December 2001
Location: Texas, USA Reputation: Yes, please.
Posts: 7,626
Reputation: 2900
Power: 232

Default Re: HOSTS file not being read

hosts

There is no file extension.

muzikool is offline   Reply With Quote
Old December 6th, 2005 Top | #6

OSNN Folding Team  
kcnychief's Avatar
█▄█ ▀█▄ █
Joined: April 2005
Location: Massachusetts
Posts: 16,949
Reputation: 4941
Power: 305

Default Re: HOSTS file not being read

Yeah the hosts file doesn't have an extension.

It's possible it's a file that is configured through the network, is it possible to copy it from another PC?

EDIT: Also, can you delete it, let Windows re-create the file, then alter the content?
kcnychief is offline   Reply With Quote
Old December 6th, 2005 Top | #7
 
Mastershakes's Avatar
OSNN Veteran Addict
Joined: July 2004
Location: Montreal
Posts: 1,721
Reputation: 1040
Power: 124

Default Re: HOSTS file not being read

When you swapped it out, it gained that .txt extention... my guess anyways... still looking.
Mastershakes is offline   Reply With Quote
Old December 6th, 2005 Top | #8
 
muzikool's Avatar
Act your wage.
Joined: December 2001
Location: Texas, USA Reputation: Yes, please.
Posts: 7,626
Reputation: 2900
Power: 232

Default Re: HOSTS file not being read

Nope, no .txt extension. It even has the generic file icon.

I tried removing all entries again, saving, adding, resaving, rebooting, flushing dns cache again. Ugh.

I'm going to delete it altogether and let Windows recreate it.

muzikool is offline   Reply With Quote
Old December 6th, 2005 Top | #9
 
muzikool's Avatar
Act your wage.
Joined: December 2001
Location: Texas, USA Reputation: Yes, please.
Posts: 7,626
Reputation: 2900
Power: 232

Default Re: HOSTS file not being read

Problem solved.

I deleted the HOSTS file altogether and rebooted. Windows did not recreate one after the reboot, but adding it back in manually worked.

Not sure why all this happened. Not sure why Microsoft's suggestions didn't work either.

muzikool is offline   Reply With Quote
Old December 6th, 2005 Top | #10

OSNN Folding Team  
Grandmaster's Avatar
Electronica Addict
Joined: February 2002
Location: Santa Clara, CA
Posts: 10,574
Reputation: 2960
Power: 260

Default Re: HOSTS file not being read

Windows has a habit of not working when you need it, and then working again later
Grandmaster is offline   Reply With Quote
Old December 6th, 2005 Top | #11
 
muzikool's Avatar
Act your wage.
Joined: December 2001
Location: Texas, USA Reputation: Yes, please.
Posts: 7,626
Reputation: 2900
Power: 232

Default Re: HOSTS file not being read

Yeah, I remember that now.

muzikool is offline   Reply With Quote
Old December 6th, 2005 Top | #12
 
Mastershakes's Avatar
OSNN Veteran Addict
Joined: July 2004
Location: Montreal
Posts: 1,721
Reputation: 1040
Power: 124

Default Re: HOSTS file not being read

Cool - only other thing I could think of was this - verifying that the registry is pointing to your hosts file. Glad you fixed it. Hate those ads

«HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters»

Value should be "%SystemRoot%\system32\drivers\etc"
Mastershakes is offline   Reply With Quote
Old December 6th, 2005 Top | #13
 
muzikool's Avatar
Act your wage.
Joined: December 2001
Location: Texas, USA Reputation: Yes, please.
Posts: 7,626
Reputation: 2900
Power: 232

Default Re: HOSTS file not being read

It would have been strange if that entry had been modified. Sometimes Windows has a mind of its own.

muzikool is offline   Reply With Quote
Old December 9th, 2005 Top | #14

OSNN Folding Team  
kcnychief's Avatar
█▄█ ▀█▄ █
Joined: April 2005
Location: Massachusetts
Posts: 16,949
Reputation: 4941
Power: 305

Default Re: HOSTS file not being read

Originally Posted by Mastershakes
Cool - only other thing I could think of was this - verifying that the registry is pointing to your hosts file. Glad you fixed it. Hate those ads

«HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters»

Value should be "%SystemRoot%\system32\drivers\etc"
that's a hot find

Muzikool, I believe (although I could be wrong), the hosts file won't auto-recreate until you try to access the internet. When you say that Windows didn't recreate it, did you check right after boot, before utilizing your internet connection?
kcnychief is offline   Reply With Quote
Old December 9th, 2005 Top | #15
 
muzikool's Avatar
Act your wage.
Joined: December 2001
Location: Texas, USA Reputation: Yes, please.
Posts: 7,626
Reputation: 2900
Power: 232

Default Re: HOSTS file not being read

Originally Posted by kcnychief
that's a hot find

Muzikool, I believe (although I could be wrong), the hosts file won't auto-recreate until you try to access the internet. When you say that Windows didn't recreate it, did you check right after boot, before utilizing your internet connection?
I browsed around a bit before looking for it. It never showed up.

muzikool is offline   Reply With Quote
Old January 30th, 2009 Top | #16
 
Claud1o's Avatar
OSNN One Post Wonder
Joined: January 2009
Posts: 1
Reputation: 0
Power: 0

Default Re: HOSTS file not being read

Originally Posted by muzikool View Post
Problem solved.

I deleted the HOSTS file altogether and rebooted. Windows did not recreate one after the reboot, but adding it back in manually worked.

Not sure why all this happened. Not sure why Microsoft's suggestions didn't work either.
Thank you so much, I guess it's the first thing I should have tried. I've wasted so much time on this one it's unbelievable. I'm so sick of Windows and all of this nonsense one has to put up with in order to keep it working. I messed up a demo and made a pathetic impression being unable to access my virtual hosts. This might just have been the last straw.

Sorry for the rant but I am really so sick of all I had to endure with this horrific OS. I had better stop now as I really feel I'm going postal.

Thanks for the solution,
Claudio
Claud1o is offline   Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules

Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft DNS resolver not looking at hosts file fitz Windows Desktop Systems 11 March 9th, 2007 4:40am
HOSTS file help... sidefx Windows Desktop Systems 1 September 23rd, 2004 5:42pm
Bearshare & HOSTS File Problems??? sidefx Windows Desktop Systems 0 August 3rd, 2004 7:47pm
How do I read the index.dat file 12355 Windows Desktop Systems 7 May 31st, 2002 5:23pm
HOSTS file to block ads (got a good one??) PsychoSpongeBob Windows Desktop Systems 2 March 24th, 2002 2:11pm