Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having this problem that seems odd to me. I have a domain name ( which must point to the IP, It's ok when I try to reach it from my local PC or every other network that I have physical access to.
The problem occurs when I try to ping the domain from it's own server using ssh! The domain name points to a completely different IP address.

I wonder if this is caused by DNS caching since we had a server change almost a month ago, in which case that should be odd too for taking this long to update.

share|improve this question
up vote 0 down vote accepted

Why would you have the server ping itself? Anyway, the A record looks fine to me, so try doing a dig of the domain from the server again. If it's still pointing elsewhere and you haven't set a ridiculously long TTL or updated name servers in the last couple of days, then the problem lies with what DNS servers your server is querying.

share|improve this answer
I was essentially trying to use wget in crontab for some php script to run periodically when I found out about this problem. So is there any way to know what DNS servers are being used? – Hamed Momeni Dec 8 '12 at 12:58

Two options I can think of:

share|improve this answer

I'd also look at what settings you have in your /etc/nsswitch file. This controls the order of hostname/IP lookups. Make sure it is in the order you want them.

One other thing, try restarting (or disabling) the nscd service. I have found that in several instances it causes the wrong result to be returned.

Take a look at the DNSen you are pointing to on your host (/etc/resolv.conf). If you are using a broken DNS then you might be having problems.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.