I am wanting to control the destination IP address for www.example.com (but not example.com) using DNS and exert the most control over this subdomain TTL as I can since I do not have direct control of the parent domain itself. I am aware of 2 mechanisms I can use:
- I can set up a zone for
www.example.comin my name servers and have the name servers forexample.comset up NS records forwww.example.com. - I can use a CNAME to point
www.example.comtoexample.mydomain.comand then controlexample.mydomain.com. This is probably simpler for the remote party to set up, as delegating using NS records is a lot less common in the circles I frequent.
What I am a little vague on is the subtleties of the ttl mechanisms - particularly around caching. If I use a CNAME, will the actual TTL be controlled by both the TTL on the www.example.com record AND the TTL on example.mydomain.com, or (provided the CNAME record does not change), is this tied only to the A record for example.mydomain.com.
Similarly, if I use NS entries, is it fair to say that (provided the nameservers do no not change), that the TTL for changes to the resolution of www.example.com is controlled by the TTL for the www.example.com A record and I don't need to worry about the TTL's of the NS records?