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

Possible Duplicate:
How long does it take for an A record to propagate?

I recently changed nameservers and it has been 24 hours since. Some of my visitors are complaining they are still viewing the old site while some are already seeing the new site. Is there any way to speed-up the DNS propagation without updating the hosts file of each of my visitors?

Are there any best practices when it comes to changing nameservers to minimize this problem?

share|improve this question

marked as duplicate by Ward, Scott Pack, mailq, mdpc, mrdenny Nov 8 '11 at 21:00

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
See also: serverfault.com/questions/125371/… –  Ward Nov 8 '11 at 18:45
    
Actually, this may be a dup of that question. –  Ward Nov 8 '11 at 18:45
add comment

4 Answers 4

up vote 9 down vote accepted

DNS records doesn't propagate in the sense that they aren't "pushed" from your server to other resolvers. What actually happens is that when other DNS servers look up your domain, they cache the record for X seconds so that they don't have to do another lookup for subsequent requests. X seconds should be determined by the TTL value on the record when it was retrieved from your name server. If you've already changed the address there's nothing you can do but sit and wait. If you had planned this in advance, you could have lowered the TTL value.

Some larger DNS resolvers cache longer than the TTL, which is a violation of the relevant RFCs (but they don't care). If you can track this issue down to a few name servers, you can email the operators and ask them to invalidate the cache for your zone so that they'll stop using the cached (old) record.

Honestly, though, unless this goes on for an extended period of time, it's probably just as well that you sit tight and wait and plan a better migration for next time, since the damage is already done.

share|improve this answer
    
Thanks. So you mean setting the TTL low is just a best bet since some ISPs don't really follow it, and that in reality, it's pretty much a sit and wait game regardless of my preparations? –  IMB Nov 8 '11 at 18:46
    
@IMB Yes. Setting a low TTL prior to an IP/server migration is a good idea, but not a guarantee. If you're swapping servers, using database replication and syncing content via rsync is usually a pretty good way to make this seamless to the end user. If you care about redundancy and availability, you should probably be doing these things anyway. You'd just add the new nodes to the replication scheme and let it sit there long enough for the non-compliant resolvers to roll their cache over (1-2 weeks usually). –  MDMarra Nov 8 '11 at 18:50
    
If I ask my users to use Google's public DNS, would this help them? Because right now I am on Google's public DNS and it's pointing to the updated nameserver. I am not sure though if it's working for all who uses Google's. –  IMB Nov 9 '11 at 9:59
    
You can ask, but if any are businesses the answer will probably be no and it could make you look bad. I'd just wait it out and do better next time. –  MDMarra Nov 9 '11 at 11:40
add comment

Are there any best practices when it comes to changing nameservers to minimize this problem?

As MarkM already said - set default TTL to small value. Best practice is "Think forward", i.e - set small TTL before time of change, wait while old records will expire, after it change RR data.

share|improve this answer
add comment

As everybody already stated, but in other words:

TTLs propagate as slow as any other record. So you can't fix DNS propagation by reducing the TTL. It is meant to prevent long caching records. It doesn't guarantee fast propagation.

share|improve this answer
add comment

Apart from ensuring that you pre-publish with a low TTL as suggested by the other answers, also ensure that your old name servers are either a) turned off, or b) serving the new zone file.

The reasons why are explained in my answer to this question, but the short version is - some resolvers will continue to query the old name servers, and won't notice that the parent zone has changed.

share|improve this answer
    
It doesn't sound like he changed name servers. I could be wrong, but it sounds like he is just updating A records. –  MDMarra Nov 9 '11 at 3:10
    
I changed nameservers like this: ns1.xxx.com to ns1.yyy.com –  IMB Nov 9 '11 at 10:00
    
@IMB so make sure the old name servers have the new NS records in their zone file - i.e. make sure every name server is consistent. –  Alnitak Nov 9 '11 at 10:20
    
@Alnitak You mean update the IP address of xxx and yyy so they point to the same IP right? The problem is the other nameserver is on a shared host (ns1.dreamhost.com) so I am unable to edit the IP. –  IMB Nov 9 '11 at 10:30
    
@IMB no, I mean get your old DNS host to change your zone file to have the same contents as your new one. –  Alnitak Nov 9 '11 at 11:13
add comment

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