Hosts file? What is this? {c:\windows\system32\drivers\etc\hosts}

by 6 comments
What is that Hosts file, found on windows XP,

found here
c:\windows\system32\drivers\etc\hosts

eg:
38.25.63.10 x.acme.com # x client host

what does this file mean, and what does it do?

what can be done modifying it?
#programming #file #hosts
  • Profile picture of the author Cigar2010
    It is like a local DNS ,usually you type x.acme.com in broswer,it go to some ip address ,but with that record added ,it go to 38.25.63.10 instead of remote dns record.
    I don't know am I right?
  • Profile picture of the author Bradley J Anderson
    Originally Posted by entry View Post

    What is that Hosts file, found on windows XP,

    what can be done modifying it?
    It maps host names to IP addresses so your computer doesn't have to ask a DNS server to do it, which allows you to access the site faster.

    For example, the host name for Google is www .google. com, but its IP address is 74.125.91.105 Typing in either address will take you to Google's site, but the www address first has to be translated into the IP address. If you type in the IP address directly, however, your computer won't have to look it up.

    The Hosts file tells your computer what the name is in numbers so the computer can go straight to it. If the IP address is found in your Hosts file, the computer will stop looking immediately and go directly to that site, but if it isn't it will ask a DNS computer (domain name server) for the information, which slows things down a bit. But, since the search ends once a match is found, it also gives you a way to block sites you may not like, too.

    If you need to find the IP for a particular site:

    Start Menu > All Programs > Accessories > Command prompt > enter "ping" followed by the URL (e.g. ping www .google. com) > [Enter].

    Your computer will ping (i.e., send a request to the URL) and will retrieve the URL's IP address.
    • Profile picture of the author Matthew Iannotti
      Its the file people use to add IP's or URL's to so they can use software they didn't purchase as that will block the activation.

      So, if you have a software product make sure your programmer forces the app to fail activation if some tries using the host file to beat your system.
  • Profile picture of the author pdhana
    Hi,

    38.25.63.10 ==> IP Address
    x.acme.com == > Hostname

    Open the file in text editor and add the below code and try http://localhost/ in your browser. You will understand what is the purpose of it.

    127.0.0.1 Google

    what the above entry will do is it maps ip address to hostnames.

Next Topics on Trending Feed