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

by 6 replies
11
#programming #file #hosts
  • 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
  • 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.
    • [1] reply
    • 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.
  • 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.
  • [DELETED]
    • [1] reply
    • 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.
      • [1] reply

Next Topics on Trending Feed