Is RFC1035s definition of a wrong?

[RFC1035] defines <domain-name> as

<domain-name> is a domain name represented as a series of labels, and
terminated by a label with zero length.

This means a <domain-name> must be a FQDN of the form an.example. with a terminating ‘.‘. Also, according to this RFC CNAME and MX EXCHANGE RDATA must be a <domain-name>.

According to Wikipedia [wiki] zone files may contain relative entries like

wwwtest IN CNAME www

which I also have used several times. So, who is wrong?

Answer

You are. Non-canonicalised hostnames in BIND zone files are automatically qualified with the domain name in question. When you write

wwwtest      IN      CNAME      www

in example.com‘s zonefile, BIND is turning the canonical name into www.example.com without asking you.

This has been known to lead to sysadmins putting entries in zonefiles for, e.g., example.com, which read

www      IN      CNAME      hosting-server.isp.example.co.uk

and then getting all surprised when their clients complain that browsers keep returning hostname hosting-server.isp.example.co.uk.example.com not found errors.

Attribution
Source : Link , Question Author : Sophie , Answer Author : MadHatter

Leave a Comment