Friday, December 3, 2010

DNS: trailing periods

SkyHi @ Friday, December 03, 2010
The trailing '.' makes the name into a "Fully Qualified Domain Name", i.e. an absolute domain name.

The trailing dot tells the DNS server that this is a fully qualified name. The dot is the root of the DNS heirarchy. If you don't use the dot, the DNS server will assume that it's a record in the current zone and will append it for you. For example, if you have a CNAME in that points to, when you query for that, you'll get, which probably isn't what you wanted.

In Bind config files if you don't add the trailing '.' then the name is assumed to be relative to the current zone file's $ORIGIN.

mail           IN A
mail2         IN A
server      IN A
@             IN MX 10  mail                       ; not FQDN - appended
                IN MX 20     ; FQDN 
                IN MX 30      ; FQDN in another domain
                IN MX 40      ; ERROR - not FQDN - appended
www      IN CNAME  server                    ; not FQDN - appended