hosts file question

rookie1010

Senior member
Mar 7, 2004
984
0
0
hello,

I am using windows xp and looked up my hosts file, it just seems to have a bunch of entries for winmx and no recent websites e.g. cnn.com that i have used.

where woud the recent entries cuh as anandtech.com, cnn.com been stored?
 

JackMDS

Elite Member
Super Moderator
Oct 25, 1999
29,471
387
126
Host file has nothing to do with Sites you visited.

Windows Host File - What is it and How to Mange it? - http://www.ezlan.net/host.html

Sited you visit would be in the Browser History, if the Browser is set to keep History.
 

err

Platinum Member
Oct 11, 1999
2,121
0
76
By default there shouldn't be any weird stuffs in your host files, especially if you don't even know what it is...

I've seen some virus variant that places stuffs inside the host files... very2 annoying...

To answer your question, the recent entries such ass cnn.com, etc is NOT and will NOT be added to your host file.
 

rookie1010

Senior member
Mar 7, 2004
984
0
0
thanks for the replies,

i thought the hosts fles maps all hosts (isnt cnn.com a host) to ip addresses.

i was reading up on the wiki entry for the hosts file (http://en.wikipedia.org/wiki/Hosts_file) and it states that

"Other uses for the hosts file

The hosts file has alternative uses, including filtering ads by having entries for known ad-servers redirect to machines without the advertising on them or more typically by redirecting references to ad-servers to the local address 127.0.0.1. This can save network bandwidth, as well, by eliminating a request to the DNS server normally used for obtaining address information, as well as by not downloading the advertisements. However, if the hosts file is to be used for this purpose, it must be kept up-to-date with lists of Internet servers known to host such content. The "DNS Client" service may need to be stopped in order for changes to the hosts file to have effect.

A more important use of the hosts file is to block known dubious or criminal domains and servers (with spyware and other malware) in the same manner used for blocking ad-servers [3].

The hosts file can also be "hijacked", or used for malicious purposes. For example, adware, computer viruses, trojan horses, or other malware can edit the hosts file to redirect traffic from a "safe" site (such as Google or Wikipedia) to sites hosting content that may be offensive or intrusive to the user or the user?s computer system. For example, a trojan (Qhosts) redirected traffic from search engines such as Google and AltaVista to a site specified by the author of the trojan horse [4]. Mydoom.B (a malware program) blocked users from visiting sites regarding computer security and antivirus software, which also affected the Windows Update web site.

Another useful and time-saving tip for website programmers, intranet developers and IT managers is to enable non-"


does this not mean that the ip address for google or any other site i visist should be within the host file?
 

rookie1010

Senior member
Mar 7, 2004
984
0
0
ah ha, here is an entry on wiki for dns which resolves my confusion
The practice of using a name as a more human-legible abstraction of a machine's numerical address on the network predates even TCP/IP, and goes all the way to the ARPAnet era. Back then however, a different system was used, as DNS was invented only in 1983, shortly after TCP/IP was deployed. With the older system, each computer on the network retrieved a file called HOSTS.TXT from a computer at SRI (now SRI International). The HOSTS.TXT file mapped numerical addresses to names. A hosts file still exists on most modern operating systems, either by default or through configuration, and allows users to specify an IP address (eg. 192.0.34.166) to use for a hostname (eg. www.example.net) without checking DNS. As of 2006, the hosts file serves primarily for troubleshooting DNS errors or for mapping local addresses to more organic names. Systems based on a hosts file have inherent limitations, because of the obvious requirement that every time a given computer's address changed, every computer that seeks to communicate with it would need an update to its hosts file.

the hosts file seems to be vestigial but neverthe less usable
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
the hosts file seems to be vestigial but neverthe less usable

Yea, it usually only used when you can't or don't want to use DNS for some reason.
 

spikespiegal

Golden Member
Oct 10, 2005
1,219
9
76
A hosts file is good for using IPs of *fixed* DNS entries. Also good for sorting out Windows Active Directory DNS issues when the internal DNS records conflict with the rest of the world.

However, I resist using a hosts file for external commercial addresses because *they change*.
 

JackMDS

Elite Member
Super Moderator
Oct 25, 1999
29,471
387
126
Add to you Host File a line like this.

129.42.60.212 ibm.com

This line says to the system to go directly to 129.42.60.212 when you type ibm.com, thus No need for external DNS resolution.
 

heymrdj

Diamond Member
May 28, 2007
3,998
63
91
I have Xampp running here on my Vista Ultimate laptop. I can take the host file and add the entry so that it's 127.0.0.1 address maps to www.bcx3.local, a test site for the Bainbridge College Computer Club, which is actually www.bcx3.org. So now all the softwares I set up can use domains, www.bcx3.local, instead of IP addresses, which not all software like portals ect will take, many demand a domain, ie FQDN.