XP PC will not look at the hosts file 1st

A little test for a Friday Arvo, does anyone have any suggestions for how
I could force an XP pc to look at a Hosts file 1st  (before DNS) for name resolution,
I realise it should do this by default, but it isnt, this problem is driving me bananas,
So any help would be appreciated. Ive already tried manually adding a [DNS]
Set of entries with relevant priority to the System.ini file, but this has brought no joy.

Over to you Gents
Who is Participating?
Are you using a proxy server?  If you are, Windows XP will use the proxy and ignore the hosts file...
Okay quick question, are you trying the name resolution from IE or from the commandline?  I only ask because I've seen IE6 and 7 both check DNS before the hosts file.  Try the commandline and if you get resolution to the hosts file, try switching browsers.
Brian PiercePhotographerCommented:
Are you sure is not a cache issue. XP will check the DNS name cache first, it there is an entry in the cache it will use that in preference to either the hosts file or DNS - and remember that unresolved lookups are also cached.

This means for example that if you perform host name resolution the IP/Host Name is cached locally (and the fact it failed if that is the case)

if you then subsequently change the hosts file or DNS and then repeat the name resolution it uses the cache - which could give a false result - including an unresolvable name - even though you have chnaged the hosts file and/or DNS

to clear the cache use
ipconfig /flushdns
Simple -- the same LMHOSTS and HOSTS files needs to be not only on the local PC, but also on the SERVERS and ALL SERVERS that relate to the domain cross subnetting.  Realize, the real value of the HOSTS and LMHOSTS is to provide direct name DNS translation ACROSS subnets, so unless it is gobally available on all key systems for the translation, including all servers and all DNS machines, it wont work.

Besides, on Friday "ARVO", you are supposed to be having beer, no?
Forced accept.

Community Support Moderator
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.