Why two lookups for a CNAME?

Barry Margolin barmar at alum.mit.edu
Thu Oct 22 14:43:29 UTC 2015


In article <mailman.2849.1445459558.26362.bind-users at lists.isc.org>,
 Steve Arntzen <isc at arntzen.us> wrote:

> I'm sure there's a good, simple reason for this, I just can't seem to find 
> the
> answer searching on the Internet.
> 
> 
> Why does named perform a lookup for the A record when its IP is returned with
> the CNAME in the first answer?
> 
> 
> Using dig, I find play.google.com is a CNAME for play.l.google.com.
> 
> 
> When asked to resolve it, named will first look for play.google.com.  The 
> result
> will include the CNAME and the IP of the A record.
> 
> 
> Named then makes a second request to resolve the A record.

Are you sure about this example?

That would be the correct behavior if the target of the CNAME were 
delegated to different servers than the CNAME itself. But both 
google.com and l.google.com are served by ns[1-4].google.com.

You'll see additional queries like this if you look up servers hosted by 
the Akamai CDN, because the CNAME points from the original domain to one 
of Akamai's domains.

-- 
Barry Margolin
Arlington, MA


More information about the bind-users mailing list