Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hosts file being ignored

Status
Not open for further replies.

Callahan

Technical User
Nov 21, 2001
174
GB
Searching for the above problem only revealed one hit and it wasn't very informative as to a solution. Here's my problem;

Our company has a website that external users need to access. This site is not viewable publicly on the Internet for reasons too long to go into. In order for users to access this site we add the website address into the hosts file and everything works fine. That was until this morning when it came to setting up a user's home laptop. Now I know that this is a configuration error somewhere but so far I've yet to determine where. Despite entering the address in the hosts file, pinging the address results in an "unknown host" error. NO I know that Windows "always" checks the hosts file first but clearly that's not the case in this instance. I've also check the entry in the registry (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters) and it is pointing to the correct location.
I've seen reports that this problem can be fixed by installing SP2. This is something I can't do as I've seen what SP2 does when applied to installations with lots of software already installed on it and it's not pretty.

So if anyone has any other suggestions as to the cause and/or fix, I'd appreciate it.

 
Yup. It's definitely the fact that Windows is ignoring the hosts file. Weird eh?
 
Does Windows resolve other addresses in the hosts file?

Cheers,
Dian
 
Try copying the hosts file from a known good workstation to the laptop, don't worry about any other entries other than that website for now. If this solves the issue, then edit the hosts file to the specs needed for the laptop. What I'm trying to test here is for is some kind of weird file corruption or a syntax/typo error.
 
DTracy, already tried it I'm afraid! I try to make a point of making forums the last ditch solution to problems hence I try all the obvious (at least to me) solutions first!
 
Are you sure the location of the hosts file you are editing is the correct one, maybe Windows is looking for the host file somewhere else, and hence ignoring the hosts file you are editing.

What does the following registry key say:
The exact location of the file hosts is determined by the [red]'HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Tcpip\Parameters\DataBasePath'[/red]
registry key
Is it the same location you have placed you hosts file in?

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Another thing to try is delete the hosts file (or rename it if there's other important stuff in there), then create a brand new hosts file and add 1 entry to it.
If the new hosts file works, then the old one is probably corrupt or has some bad entries, so you'll have to add the rest of the entries by hand (don't copy & paste since that might copy some invisible characters that corrupted it in the first place).
 
Any third party security products interfering with the Hosts file? Are the Access Permissions correct? Does cleaning out Temporary Internet Files, or adding to Trusted Sites do anything?

Strange behaviour resolving hostname
thread779-1308474

This utility will also try to correct HOSTS issues:
FAQ779-4625

Google seems to be only URL can't access
thread779-800009

813444 - HOW TO: Troubleshoot Situations Where You Cannot Connect to Secure Web Sites by Using Internet Explorer in Windows XP
 
vacunita, I've checked the database path in the registry and it's correct (check my first post! :) )

cpjust, already tried your suggestion too I'm afraid. No go.

linney, again, I've tried to kill anything that may be 'protecting' the hosts file, AVG down and Zonealarm but still nothing.

In all honesty guys, despite all of your help, I'm putting this down to a lost cause. It still bothers me why exactly this won't work as it should be something simple.

Nevermind, thanks for all your suggestions!
 
I just had the same problem. Windows XP pro simply ignores hosts file entries.

In my case the problem was in disabled network adapter. Computer(HP Compaq d530) has two NICs, one onboard and one added into free PCI slot. I've disabled onboard NIC which is making strange troubles (not working on from time to time) after harddisk format and Windows reinstall and hey, Windows ignores hosts. After googling half hour and trying many things I've just tried to enable onboard NIC and suprise: Windows is getting IP addresses from hosts.

Hope that helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top