HOSTS file not being read

muzikool

Act your wage.
Political Access
Joined
27 Dec 2001
Messages
7,626
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?
 
Stand alone machine, or part of a network?

When did this start happening?
 
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. :ermm:
 
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)
 
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?
 
When you swapped it out, it gained that .txt extention... my guess anyways... still looking.
 
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.
 
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.
 
Windows has a habit of not working when you need it, and then working again later :p
 
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"
 
It would have been strange if that entry had been modified. Sometimes Windows has a mind of its own.
 
Mastershakes said:
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 said:
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.
 
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
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back