Question:
What is the purpose of the Host file?
Craig W
2007-02-26 16:39:43 UTC
What is the purpose of the Host file?
Seven answers:
Gene M
2007-02-26 16:48:03 UTC
You can use the hosts file to 'override' dns server results. If you want anyone who uses your machine to get google when they try to go to playboy.com, you can out an entry in your hosts file in the format xx.xxx.xxx.xxx host.domain.com, and that hostname will go to the IP you assign. It can also be used for devices that are not in a dns server anywhere, if you have local machines on your network that you want to access by name instead of IP.
Bulk O
2007-02-26 23:03:29 UTC
All good answers, but in a strictest sense the host file just does what DNS does. And that is takes a name that a human likes to use like "mycomputer" and translate it to an IP address, which is what the computer really needs to connect to another computer.



The host file can be used when a DNS server is not available, like if you just want to connect to computers together, and in most cases because the host file is consulted before the DNS server it can be used to override what the DNS server would give for the IP address, which as you see from the other answers can be used for any useful translation you like.
Sir W
2007-02-26 18:55:12 UTC
This is originated from the old unix culture, the /etc/hosts file.



The file name and format from the unix are actually preserved on the Windows. In addition to the answers you already have, I know there are some home grown applications, purposefully makes the administrator to setup entries in the hosts file. Because these applications wants to pick up the IP addresses predetermined by the administrator.



Examples for that? Teradata utility has the habit to do that, if you miss the steps to add the entries to your hosts file, the utility program will error out because it can not get the target name in the hosts file.



Hope you like Teradata ...::))
anonymous
2007-02-26 16:55:47 UTC
Per:

http://www.answers.com/main/ntquery?s=hosts%20file&gwp=13



"Since the late 1990s, the HOSTS file mechanism has been adopted (primarily by Microsoft Windows) as a way to protect vulnerable computer systems from malware. At odds with the original intent of the HOSTS file, this adopted use actually takes host names that are perceived as malicious or unwanted and overlays them with "safe" IP addresses."



Creating Your Hosts File:

http://www.beemerworld.com/tips/hosts.htm



Blocking Unwanted Parasites with a Hosts File

http://www.mvps.org/winhelp2002/hosts.htm
Stanley N
2007-02-26 16:54:04 UTC
Depending on what OS and how system is configured. On Windows, if you don't have a DNS server on your network, you can use host file to map certain hostname to its IP address. This host file will override the setting served from your DNS server.

On UNIX, however, you can use nsswitch.conf to configure which one takes priority so when you ping a server, it can do a query from your DNS server -> hosts ->NIS, etc..
anonymous
2014-07-25 09:34:13 UTC
Well

I've used Safeip . Link -> http://bitly.com/1k4kV2f

It's a nice free solution
anonymous
2007-02-26 17:42:52 UTC
contain all the server, workstation ip address


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...