Preloading IPs of common websites using hosts file?

Discussion in 'other software & services' started by Cvette, Aug 21, 2011.

Thread Status:
Not open for further replies.
  1. Cvette

    Cvette Registered Member

    Joined:
    Apr 16, 2010
    Posts:
    373
    Location:
    South Carolina, USA
    Good morning everyone.

    I'm wondering if such a thing is possible. Is there a way to "preload" the IP of a commonly used website (e.g, Facebook, Google, YouTube) and eliminate the DNS lookup?
     
  2. Cudni

    Cudni Global Moderator

    Joined:
    May 24, 2009
    Posts:
    6,956
    Location:
    Somethingshire
    What are you hoping to achieve by eliminating dns lookup?
     
  3. Cvette

    Cvette Registered Member

    Joined:
    Apr 16, 2010
    Posts:
    373
    Location:
    South Carolina, USA
    Our DNS is very unstable, and look-ups take up to 30 seconds. I'm hoping to preload the IP for the few sites that I visit, and thus (hopefully) eliminate that amount of time. I've tried switching to a new DNS provider such as OpenDNS, but receive the same results.
     
  4. funkydude

    funkydude Registered Member

    Joined:
    Apr 5, 2004
    Posts:
    6,853
    Yes, but you may need to double check the IP's every year or so incase a server closer to you has been set up. You may also be confronted with a non-working website if a server is taken down for whatever reason.
     
  5. Cvette

    Cvette Registered Member

    Joined:
    Apr 16, 2010
    Posts:
    373
    Location:
    South Carolina, USA
    Cool. So, how can I go about doing it?
     
  6. funkydude

    funkydude Registered Member

    Joined:
    Apr 5, 2004
    Posts:
    6,853
    nslookup facebook.com

    ping the IP's to find the fastest, use it in the HOSTS file.
     
  7. Cvette

    Cvette Registered Member

    Joined:
    Apr 16, 2010
    Posts:
    373
    Location:
    South Carolina, USA
    I see. So instead of using 127.0.0.1, I use the IP along with host name. Thanks!!! :D
     
  8. Sully

    Sully Registered Member

    Joined:
    Dec 23, 2005
    Posts:
    3,719
    If you have a friend in your area who is using another ISP for service, as what their DNS addresses are, you can try using the other ISPs DNS servers. This sometimes is faster.

    If you are going to use the hosts file, look up a batch script to do the work for you. You can use nslookup if you like, or you can use ping as well. You will need to look up the "for" command in dos to do this, but there are many examples if you search for them. In fact, you can probably find a script that is already made that does what you want.

    Sul.
     
  9. siberianwolf

    siberianwolf Registered Member

    Joined:
    Feb 15, 2009
    Posts:
    516
    if it takes 30 secs or more for the ip's to be resolved by your dns server, this most probably indicates that your problem is not w/ the dns server but something else is wrong w/ your connection. cuz resolution of ip's aren't meant to take that long time.
    as to the hosts file thingie, the ip's for websites such as youtube, facebook, etc are not single ip numbers but instead there's a pool of ip's reserved for those websites by the hosts, and every time you connect to those sites, they get a different ip number. so it won't help you adding those ip's you get via sites like selfseo, etc to your hosts file.
     
  10. funkydude

    funkydude Registered Member

    Joined:
    Apr 5, 2004
    Posts:
    6,853
    I'd also check if the DNS Client service is disabled, enable it if it is.
     
Loading...
Thread Status:
Not open for further replies.