Why does my domain resolve incorrectly on the server's network?

8,100

You have to start debugging at the computer where you get the wrong IP, to try to figure out where the erroneous IP lookup comes from. First check your /etc/hosts file to see if you happen to have any entries in there pointing to 88.108.252.160 (seems to be a DSL IP (your home IP?) 88-108-252-160.dynamic.dsl.as9105.com.).

Just to ask too, make sure the computer you ping from isn't NAMED alexcoplan.co.uk! :)

Next step would be to check where /etc/resolv.conf points to and ask those nameservers for the IP for alexcoplan.co.uk to see if they somehow have cached the wrong IP.

If nothing seem to work you can try configuring your computer to use Googles public DNS as your nameservers for a while, to outrule that there is something wrong with your current configured nameservers. Googles recursive DNS servers that you can use is 8.8.8.8 and 8.8.4.4. Read more about them here:
http://code.google.com/speed/public-dns/

Share:
8,100

Related videos on Youtube

Alex Coplan
Author by

Alex Coplan

Hello! I'm a Computer Science student. I like all things computery, but am especially interested in Ruby (+Rails), Javascript, AI and NLP. I enjoy hacking, making anything web-related and have written a couple of iPhone apps. Other things I like: Music, especially the organ! Languages: I can speak quite a bit of German and I'm a beginner in Spanish. I have a slight obsession with Duolingo Also, before you downvote my post:

Updated on September 18, 2022

Comments

  • Alex Coplan
    Alex Coplan almost 2 years

    I've just set up a home server to host my site. I can access the site fine from any network apart from my home network.

    I thought it might be an issue with DNS, so I decided to ping my domain from my laptop (on my home network), and got the following:

    $ ping alexcoplan.co.uk
    PING alexcoplan.co.uk (88.108.252.160): 56 data bytes
    Request timeout
    Request timeout
    etc...
    

    Which is really strange, because the domain is resolving to the wrong IP.

    I knew that the site was working, because I accessed it on my phone via the cellular network and it loaded fine. Just to double check, I ran terminal emulator on my phone, and pinged my site, and got the following:

    $ ping alexcoplan.co.uk
    PING alexcoplan.co.uk (88.111.7.117): 56 data bytes
    

    Which is the correct IP.

    So that begs the question, why is my domain resolving incorrectly inside the network?

    • Philip
      Philip over 12 years
      Server Fault is for Professional System Administrators only. This question is well suited to Super User however and will be migrated there automatically. Start troubleshooting by: Do a nslookup alexcoplan.co.uk and see what DNS server you're getting the wrong result from. Could the wrong IP be a cached entry (ie was it this IP at one point in the recent past)? Are you using a router that allows for hairpin connections, ie can you type the IP address into your browser on your laptop and get the websites (this doesn't affect the wrong DNS thing). Is the hostname of any of the computers alexcoplan.co.uk?
  • Alex Coplan
    Alex Coplan over 12 years
    thanks - my first step was indeed to check the hosts file. - the server isn't named that. - do you mean that I should add the nameservers for my domain to my resolv.conf file?
  • Alex Coplan
    Alex Coplan over 12 years
    google public dns does solve the issue though!