• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

HOSTS file not being read

muzikool

Act your wage.
Political User
#1
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

Act your wage.
Political User
#3
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:
 
#4
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)
 

kcnychief

█▄█ ▀█▄ █
Political User
#6
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?
 

muzikool

Act your wage.
Political User
#8
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

Act your wage.
Political User
#9
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.
 
#12
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"
 

kcnychief

█▄█ ▀█▄ █
Political User
#14
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?
 

muzikool

Act your wage.
Political User
#15
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.
 

Claud1o

OSNN One Post Wonder
#16
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

Latest posts

Latest profile posts

Perris Calderon wrote on Electronic Punk's profile.
Ep, glad to see you come back and tidy up...did want to ask a one day favor, I want to enhance my resume , was hoping you could make me administrator for a day, if so, take me right off since I won't be here to do anything, and don't know the slightest about the board, but it would be nice putting "served administrator osnn", if can do, THANKS

Been running around Quora lately, luv it there https://tinyurl.com/ycpxl
Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,962
Messages
673,247
Members
89,020
Latest member
saryrehgy