host file not working

K

KitRamos

okay I'm having an odd problem here. I don't have problem getting to
websites, but that is also the problem some websites I'm susposed to have a
problem getting to but I don't.

or putting it another way, here's a test I did
File: c:\windows\system32\drivers\etc\hosts
127.0.0.1 localhost
127.0.0.1 weather.com

after saving the file I did the ipconfig /flushdns
and it said "Successfully flushed the DNS Resolver Cache."
then i issued nslookup www.weather.com
Non-authoritative answer:
Name: weather.com
Addresses: 63.111.24.22, 63.111.69.56, 65.207.183.13

then I tried nslookup localhost
*** dns-cac-lb-01.tampabay.rr.com can't find localhost: Non-existent domain

I checked my registry next
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DataBasePath is set to: "%SystemRoot%\System32\drivers\etc"
next I checked the system varables
SystemDrive=C:
SystemRoot=C:\WINDOWS

I then did a netsh and dump, and restarted my computer.
I then tried again to do a nslookup on weather.com and again it found the
actual ip address of the website complety ignoring the entry in the hosts
file. then I tried the localhost and again it said it didn't exist.

what is gooing on? and more importnaly how do I fix this?
 
K

KitRamos

I just relised something that I did that I didn't mention that will probly
help clarify the problem
I also did a nslookup on weather.com as well as www.weather.com when I I
mentioend i was dooing just one I actualy did bouth just to be through but
forgot to mention it.
bouth times it found the acutal ip not the one listed in the hosts file
 
K

-Karl

Not sure if you plan on using the hosts file on multiple PCs but for
me on my PC, I used to use the HOSTS file myself but it's extremely
limited and I ended up using a nice app called AdMuncher. Try the 30-
Trial. Im not promoting them but I do have to say they are good and
you can easily customize the list as needed.

If you need to manage multiple PCs, well, I still would recommend some
software util that you can copy the configs to. I've always liked
Symantec personally but that may not be feasible.

Still you'll end up realizing how limited the HOSTS file is. Granted
for a simple domain name it'll work but it won't stp scripts / ads /
subpages in a domain you allow

Just my 2 cents
 
J

John Wunderlich

okay I'm having an odd problem here. I don't have problem getting
I just relised something that I did that I didn't mention that
will probly help clarify the problem
I also did a nslookup on weather.com as well as www.weather.com
when I I mentioend i was dooing just one I actualy did bouth just
to be through but forgot to mention it.
bouth times it found the acutal ip not the one listed in the hosts
file

:

Your problem is that you are using the program "nslookup" which is
short for "Name Server Lookup". This program will *always* do a lookup
on a name server and report the answers given by the name server, which
of course, bypasses the Hosts file.

Try using a command/program like:
ping weather.com
and see what the normal name resolution path comes up with...

HTH,
John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top