Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Initially my domain , mycompany.com points to this IP: - 123.456.789.101 (sample only)

Then i got another VPS and then decided to move the mycompany.com into this new IP/Host: - 987-654-123.123 (sample only)

I changed the necessary stuff like DNS, etc. from my domain management panel.

But when i ping it : ping mycompany.com , sometimes it gives the first IP, sometimes the second one.

Also when i visit the url from the browser, sometimes it loads, sometimes it doesn't.

How can i solve this? Please help.

Thanks

share|improve this question
    
Giving a dummy IP address as an example is useless, specially one which is not syntactically correct. –  bortzmeyer Nov 2 '12 at 19:39

2 Answers 2

up vote 1 down vote accepted

Assuming you correctly removed the old DNS records and added the new ones, this is because of how DNS resolvers cache requests. Be patient, eventually the caches will invalidate and everything will point to your new address.

share|improve this answer
    
Thank you MDMarra! –  user43726 Nov 2 '12 at 15:56
    
Note the "assuming". A big assumption. –  bortzmeyer Nov 2 '12 at 19:38
    
@bortzmeyer The OP says that he deleted the record, so I qualified my answer accordingly. I don't think it's that big of an assumption, unless you have reason to believe that the OP is incompetent for some reason. –  MDMarra Nov 2 '12 at 19:39
    
I have, see my answer. –  bortzmeyer Nov 2 '12 at 19:40
    
The answer of MDMarra is correct, i just confirmed it now, i can ping the domain with the same IP address, it just being cached. So thanks again. –  user43726 Nov 4 '12 at 14:06

At first glance, two possibilities: 1) you did not properly delete the old address and it is still there or 2) the old address is still in some resolver's caches for the duration of the record's TTL (Time To Live). Because of the symptoms you describe (sometimes, ping displays the new address and sometimes the second, and I assume you ran ping on the same machine), I would vote for 1).

Hard to say more since you did not provide details, especially the real domain name. https://dougbarton.us/DNS/bind-users-FAQ.html#RealNames

You can see which hypothesis is the right one with the dig command on Unix. For instance, with www.example.com :

% dig AAAA www.example.com 
...
www.example.com.        170199  IN      AAAA    2001:500:88:200::10

Only one IP address here. If you see two (by the way, AAAA = IPv6 address, A = old IPv4 address), it means hypothesis 1) is right. Otherwise, check the number in the second field. Here, 170199 seconds: the address record will stay in the cache for a bit less than two days. Retry dig and you will see this time-to-live decrease.

share|improve this answer
    
I know i don't know anything about the IP address thing, what;s the correct segmenting, etc, i know nothing about the "Network Admin" thing, sorry if my example didn't pass your standards, the issue here is i got two different IP's when i ping my recently moved domain to a new server, that's it. Maybe next time when i ask about Network related stuff, i hope you're still present to comment. –  user43726 Nov 4 '12 at 14:11

Your Answer

 
discard

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.