HOW-TO: move sites/change nameservers/IPs? (DNS propagation)
This is very usefull information so that there is no problem with dns propagation.This will make your life a lot easyer!
First edit the dns zones, change the TTLs to 600:
@ 600 IN SOA ns1.yourdomain.com. admin.yourdomain.com. (
1052320111
28800
7200
3600000
600
)
Next restart DNS (BIND) and wait until your previous TTL has expired. You can verify when it has expired by using "dig" in the comand line:
$ dig mydomain.com
;; ANSWER SECTION:
mydomain.com. 86398 IN A xxx.xxx.xxx.xxx
$ dig mydomain.com
;; ANSWER SECTION:
mydomain.com. 86397 IN A xxx.xxx.xxx.xxx
As you can see the result is cached, but there is a one second decrement. When it gets to zero, the nameserver will look up the answer again.
Now you're thinking this will be right over, but you are wrong!
The propagation still has to go to the root servers and then back to you. And you can check this:
$ dig com
com. 10800 IN SOA a.gtld-servers.net. nstld.verisign-grs.com. 2003051900 1800 900 604800 86400
Since we are using a .com domain we will use a.gtld-servers.net and we can check it down the road using
$ dig @a.gtld-servers.net mydomain.com
and then
$ dig @nstld.verisign-grs.com mydomain.com
So you can track the updates until they are finished!
The purpose is that if you are changing your nameserver or the ip address of a domain, you must get the root servers to update first (and fast) and then all the second level will have the correct dns when the TTL expires!
IMPORTANT NOTE: After this is completed change the TTL to it's original value (14400 and 86400 in case you forgot) or your server will have a higher load and cause unnecessary dns traffic!!!
Hope this is helpfull to you all, no more 24h rides!
~ Daniel