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?
#programming #file #hosts
Avatar of Unregistered
  • 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 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 }}
Avatar of Unregistered

Trending Topics

  • 99 {{ upvoteCount | shortNum }}

    Warriors .... Warriors.... what would you like to LEARN?

    Good Morning awesome Warriors... I'm happy to announce that The Warrior Forum is planning to create our first COURSE. Yes... Powered by Warrior Wisdom... yeah!! Made at home. But before ... [read more]

  • 69 {{ upvoteCount | shortNum }}

    How I Sold 985 Copies of an Affiliate Offer in 5 Days (Step by Step)

    When I first started online in 2002, it took me a year to sell 985 copies of anything. These days, I can typically do it in the span of a ... [read more]

  • 2 {{ upvoteCount | shortNum }}

    Is this true? Can we sell on premium themes?

    asc in Internet Marketing

    I was looking for a particular WP theme and it costs around $100. Then an advert popped up saying I could purchase it for $4.99. Went to the site to ... [read more]

  • 1 {{ upvoteCount | shortNum }}

    Is this keyword stuffing?

    strangeasangels in SEO

    I am coming up with url structure for travel site. I want it to be SEO friendly and represent geographical hierarchy of destinations as well as site structure we will ... [read more]

  • 33 {{ upvoteCount | shortNum }}

    1 Powerful Concept that Grows Your Business

    Connect with people interested in what you have to offer. Mindfully. Versus desperately running from prospect to prospect, or from number to number. This idea sounds simple, and like common ... [read more]