Saturday, January 31, 2015

domain name system - Cached Nameservers, can I change a record of old server to new?




I am having a problem with a domain having cached nameservers. It goes to the old website instead of the new in some areas. Am I able to go to the old hosting DNS and change the A record and get it to the new website? How long does this cache take to expire?


Answer




Am I able to go to the old hosting DNS and change the A record and get it to the new website?




Yes, this is exactly what you should do.




How long does this cache take to expire?





Short Answer



Wait a week.



Typically your transition period shouldn't last more than a few days, but it's rare to see ones that require an entire week. If you don't want to get into the technical details of how this process works, a week should be safe. A week also gives you time to notice anything catastrophically wrong with your new environment that might force you to "roll back" to the old servers.



Long Answer




I'm going to steer you to a closely related Q&A on this one:



Migrating DNS provider when having high NS-record TTL



When you log into your registrar control panel and change DNS servers, you enter into a transition period where any recursive DNS servers that are already aware of your domain must pick up the change. The only safe thing you can do is maintain both your old and new nameservers in an identical state until this period expires.



The duration of this transition period is the largest TTL associated with your domain in the delegation path. This would be the NS records living inside of the nameservers you control, as well as the delegation pointing to it. This is easier to explain visually, and you can find these values by either using the dig command on a UNIX/Linux box (dig +trace example.com), or using similar web based tools that provide the same functionality.



In the case of example.com, you should see output similar to the following:




.           233637  IN  NS  a.root-servers.net.
. 233637 IN NS b.root-servers.net.
. 233637 IN NS c.root-servers.net.
. 233637 IN NS d.root-servers.net.
. 233637 IN NS e.root-servers.net.
. 233637 IN NS f.root-servers.net.
. 233637 IN NS g.root-servers.net.
. 233637 IN NS h.root-servers.net.
. 233637 IN NS i.root-servers.net.
. 233637 IN NS j.root-servers.net.

. 233637 IN NS k.root-servers.net.
. 233637 IN NS l.root-servers.net.
. 233637 IN NS m.root-servers.net.
;; Received 228 bytes from 8.8.4.4#53(8.8.4.4) in 4 ms

com. 172800 IN NS h.gtld-servers.net.
com. 172800 IN NS l.gtld-servers.net.
com. 172800 IN NS a.gtld-servers.net.
com. 172800 IN NS f.gtld-servers.net.
com. 172800 IN NS c.gtld-servers.net.

com. 172800 IN NS m.gtld-servers.net.
com. 172800 IN NS i.gtld-servers.net.
com. 172800 IN NS k.gtld-servers.net.
com. 172800 IN NS g.gtld-servers.net.
com. 172800 IN NS e.gtld-servers.net.
com. 172800 IN NS d.gtld-servers.net.
com. 172800 IN NS j.gtld-servers.net.
com. 172800 IN NS b.gtld-servers.net.
;; Received 489 bytes from 192.112.36.4#53(192.112.36.4) in 32 ms


example.com. 172800 IN NS a.iana-servers.net.
example.com. 172800 IN NS b.iana-servers.net.
;; Received 165 bytes from 192.26.92.30#53(192.26.92.30) in 2484 ms

example.com. 86400 IN A 93.184.216.34
example.com. 86400 IN NS a.iana-servers.net.
example.com. 86400 IN NS b.iana-servers.net.
;; Received 93 bytes from 199.43.135.53#53(199.43.135.53) in 22 ms



In the above output, we would ignore the TTLs associated with . and com., because those are not for our domain. The TTLs that interest us are the last two sets, which are both associated with example.com.. The first set is the delegation to the nameservers you had configured in your registrar control panel. The second set is the NS records that live on those DNS servers. To ensure a smooth transition you must use the larger of these two values, which is usually the delegation.



In the above example, your transition period would be 172800 seconds. (two days)


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...