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

by entry
6 replies
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?
#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?
    {{ DiscussionBoard.errors[3971190].message }}
  • 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.
    {{ DiscussionBoard.errors[3971283].message }}
    • 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.
      {{ DiscussionBoard.errors[3971297].message }}
  • 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.
    {{ DiscussionBoard.errors[3972074].message }}
  • Profile picture of the author Terry Crim
    [DELETED]
    {{ DiscussionBoard.errors[3977751].message }}
    • Profile picture of the author TG12
      All good answers. You can get a custom hosts file to block ads and other dodgy sites. Also if you were using it for faster DNS lookups and you want faster you could use DNSBench instead.
      Signature
      Vaoser Link Ninja Software
      DHV Delivery Systems FAILING at online dating???
      {{ DiscussionBoard.errors[3979869].message }}
      • Profile picture of the author Bryan99
        Without using big words, the hosts file is a text file that you can use to block suspicious websites,

        e.g.: If you block Adsense's ad server there, you won't see any Adsense ad in any of the websites you visit.

        You can block adult/illegal websites as a form of parental control (Although I wouldn't recommend that as there are tons of free/paid software that are far more effective than simple manual website blocking).
        {{ DiscussionBoard.errors[3980501].message }}

Trending Topics