mail us  |  mail this page

products  |  company  |  support  |  downloads  |  isp services  |  contact us

The DOT in a Zone File

Sometimes you need it sometimes you don't. At first glance, and even at the fourth glance, it seems confusing.

It is not. The rule is simple and we call it the ORIGIN substitution rule.

If there is a dot at the end of a name in a resource record or directive, the name is qualified and if it contains the whole name including the host then it is a Fully Qualified Domain Name - FQDN. In this case the the name as it appears in the RR is used unchanged.

If there is NO dot at the end of the name (a.k.a. label in DNS jargon), the name is unqualified and DNS software adds the value of the last or only $ORIGIN directive. In the absence of an $ORIGIN directive the zone name from the named.conf file for this zone is used to synthesize an $ORIGIN directive. The fragment below illustrates this using A records and CNAME records.

; zone file fragment for example.com
; the named.conf file contains 'zone "example.com"'
; there is no $ORIGIN statement
; name in the line below is expanded to joe.example.com.
joe               IN      A      192.168.254.3 
; line below - www.example.com. aliased to joe.example.com.
www               IN      CNAME  joe 
; next line is functionally the same as line above
www.example.com. IN      CNAME  joe.example.com.
; and so is this line
www               IN      CNAME  joe.example.com.
; the name in this is record defaults to example.com
; assuming it was placed at the zone apex 
                  IN      A      192.168.254.3
; and could have been written as 
example.com.      IN      A      192.168.254.3
; OR
@                 IN      A      192.168.254.3

Easy really!

Note: In general we always suggest that you use an $ORIGIN directive in every zone file because it makes understanding the effects of the above substitution rule much simpler to understand.

Pro DNS and BIND by Ron Aitchison

Contents

tech info
guides home
intro
contents
1 objectives
big picture
2 concepts
3 reverse map
4 dns types
quickstart
5 install bind
6 samples
reference
7 named.conf
8 dns records
operations
9 howtos
10 tools
11 trouble
programming
12 bind api's
security
13 dns security
bits & bytes
15 messages
resources
notes & tips
registration FAQ
dns resources
dns rfc's
change log

Creative Commons License
This work is licensed under a Creative Commons License.

If you are happy it's OK - but your browser is giving a less than optimal experience on our site. You could, at no charge, upgrade to a W3C STANDARDS COMPLIANT browser such as Mozilla

printer friendly

Print Page

SPF Record Conformant Domain Logo

Copyright © 1994 - 2008 ZyTrax, Inc.
All rights reserved. Legal and Privacy
site by zytrax
Hosted by super.net.sg
web-master at zytrax
Page modified: June 21 2007.