CNAME chain TTL values – which is used

domain-name-system

Our setup has to make use of several CNAME references. My question is regarding TTL values and if those lower in the chain are respected or if they are trumped by the top of the chain?

Let me give a little background. We have a client which uses a subdomain of their corporate domain to point at our infrastructure. That points to one of our subdomains – which allows us to effectively control their DNS without requiring access to their DNS. Our DNS record points to a further CNAME (and AWS ELB).

Client CNAME -> Our CNAME -> ELB

If the client sets a large TTL value, will our TTL value be ignored, or can I still drop the TTL value of ours ahead of a change?

To be explicit, if the client has a TTL of 24 hours, and we set ours to 1 hour. What will be the effective TTL of the domain address?

thanks

Best Answer

Assuming software that is well behaved, all of the TTL values are respected. (If not well behaved probably none of the TTL values are respected, alternatively no short TTL values are respected.)

Ie, each time you look up the name used by the client in your example these CNAME records will have to be followed by the resolver server. If a record part way through your original chain of CNAMEs has expired from its cache it will need to go out and look that up again, the new response possibly leading somewhere else than what your original chain of records looked like.