Let's say I have the following configuration in my DNS records:
I have a CNAME record that is pointing www.domain1.com to www.domain2.com. However, in the DNS information for www.domain2.com, there is a CNAME record forwarding it to www.domain3.com. So www.domain1.com is actually pointing to www.domain3.com.
Is this possible? And if so, would this cause ANY slow down to the end user due to the 2 tier CNAME setup (2 DNS lookups instead of 1)? Or is all this stuff cached anyways? (Speed is paramount for this project)
just looking for the CNAMEs, it is actually 3 DNS lookups instead of 1 (there are 3 names to look up: 2x CNAMES and finally 1x A record). However, before getting at this level to look up individual records, the user has to lookup the authoritative DNS servers for every domain first and then deal with 3 DNS servers. So the overhead (if no rootserver lookup is needed) is 6 lookups instead of 2.
This stuff *may* eventually get partially cached at the user's end. I know about A records being cached. But I don't know about CNAMEs and NS. Perhaps different resolvers may have diferent policies -- don't know either. And all that stuff has to be looked up at least once before it can eventually get cached on the user's end.
So, for performance reasons, defining the A record IP address inside the DNS of domain1.com would avoid overhead.