Resolving CNAMEs when pointing to another domain

Eric A. Hall ehall at ehsco.com
Mon May 8 15:12:57 UTC 2000


> my vendor says to set up records like this:
>       foo.mydomain.com IN CNAME foo.mydomain.com.theirdomain.com
> 
> They will in turn handle the A record for
> foo.mydomain.com.theirdomain.com, since over time they may choose
> to move the service to some other box under their control.
> 
> The problem is that if I just point my browser (IE, Netscape, Lynx -
> doesn't matter) at "foo.mydomain.com" I get a lookup failure.

The browser sees a multi-label domain name, so it assumes the name is an
FQDN, and issues a query for the FQDN of "foo.domain.com." Try to ping
foo.domain.com (without the trailing dot) and see what happens, your
resolver ought to try it as is.

> However, if I do the following:
>     # nslookup
>     > lserver myispDNShere
>     > set type=any
>     > foo.mydomain.com
>     foo.mydomain.com   canonical name = foo.mydomain.com.theirdomain.com
> 
> Then I point my browser at "foo.mydomain.com" and, voila!, it "works".

> it doesn't seem to matter whether my client's nameserver is pointing
> at a Windoze or a Linux box.

Since it doesn't work with any of your local servers -- but does work
with your ISPs servers -- then it sounds like you've typo'd the CNAME
record on your local servers. The exact syntax should be:

    [assuming the zone's domain context is set to mydomain.com.]

    foo		CNAME	foo.mydomain.com.theirdomain.com.

with trailing dot on the canonical host entry.

If you're using

    foo.mydomain.com IN CNAME foo.mydomain.com.theirdomain.com

then the CNAME alias name is actually getting mapped to the FQDN of
"foo.mydomain.com.domain.com." and the canonical host is getting mapped
"to foo.mydomain.com.theirdomain.com.domain.com."

-- 
Eric A. Hall                                            ehall at ehsco.com
+1-650-685-0557                                    http://www.ehsco.com



More information about the bind-users mailing list