Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When I edit my bind dns records, I need to add a trailing period for it to work. What is the point of this?

How come when I use everydns.net, they do not require me to add a trailing period?

Is this an implementation quirk?

share|improve this question
    
What a great question. I never really paid attention to that dot, but the answers here have been very educational (in content and syntax). –  Kara Marfia Jun 3 '09 at 19:38

8 Answers 8

up vote 12 down vote accepted

DNS itself has a root zone. this zone it called literally ".". Bind requires that you fully qualify a DNS name (this includes the . or root zone). Other UIs simplify this by assuming the root zone for you.

Within Bind, you may define an Origin variable that will be automatically appended if you do not specify a FQDN (Fully Qualified Domain Name, including the trailing .). Alnitak has an excelent example of the syntax and various uses of this.

share|improve this answer
    
Actually, you can define the $ORIGIN variable to fully qualified your hostnames. Look at Russell Heilling and Alnitak comments below. –  Benoit Jun 3 '09 at 10:37
    
Very good point. I'll edit to add something regarding that fact. –  Kevin Colby Jun 3 '09 at 14:18

If you do not enter the trailing "." then the server will add the value of $ORIGIN to the end of the record. This can be a very useful shortcut and save a lot of typing if used well.

Unfortunately it is also easy to forget the "." which can result in hard to diagnose problems.

Technically the "." on the end of a record such as www.serverfault.com. indicates the separator between the "com" gTLD and the "" root zone.

share|improve this answer

The trailing '.' makes the name into a "Fully Qualified Domain Name", i.e. an absolute domain name.

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.

i.e.

$ORIGIN example.com.
mail    IN A      192.168.1.1
mail2   IN A      192.168.1.2
server  IN A      192.168.1.3
@       IN MX 10  mail                   ; not FQDN - example.com. appended
        IN MX 20  mail2.example.com.     ; FQDN 
        IN MX 30  mail.example.net.      ; FQDN in another domain
        IN MX 40  mail2.example.net      ; ERROR - not FQDN - example.com appended
www     IN CNAME  server                 ; not FQDN - example.com. appended
share|improve this answer
1  
Remember also that ORIGIN, if not specified in the zone file, is defined implicitly by the name of the zone served. –  bortzmeyer Jun 4 '09 at 10:14

The . makes the name be relative to the root, without it, it the name will be relative to the current zone. The standard zone format is defined in rfc1035 and rfc1034.

How come when I use everydns.net, they do not require me to add a trailing period?

Is this an implementation quirk?

Yeah, it sounds like easydns.net is doing it a bit quirky.

share|improve this answer
2  
strictly speaking it's called "fully qualified", not "relative to the root". –  Alnitak Jun 3 '09 at 6:55
    
Sort of like the difference between specifying /var/log and var/log –  Matt Simmons Jun 3 '09 at 14:53
    
no, more like the difference between /var/log, and log, if the current directory is /var –  Alnitak Jun 3 '09 at 15:09

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 exmaple.com that points to host.example.org, when you query for that, you'll get host.example.org.example.com, which probably isn't what you wanted.

The reason why you didn't have to with everydns.net is because they probably wrote their UI so you didn't have to worry about this technical detail.

share|improve this answer

In an fqdn, the dots are the actual identifiers. "com" and "edu", "hp" and "stanford" are just arbitrary delimiters. The dot's are uniquely identified by their spin.

share|improve this answer
2  
Forgive me, serverfault, that silliness just came into my head as I was trying to wrap my head around the dns-root-level concept I had read about so long ago. I think one way to think of it is that the DNS root level is basically a null string. So, if you want to be fully qualified, you have to add a dot. If DNS were designed by a large commitee or Microsoft, the top level would be "top" or something, and you'd have to add ".top" to an FQDN. Decide for yourself which would be more of PITA. –  Bryan Seigneur Jun 2 '09 at 20:08
    
What about the dots' spin? :P That was so random... –  shylent Jun 2 '09 at 20:27

The original designers wanted to be able to specify hosts in zone files with a minimum of typing, therefore it defaults to appending the zone to each entry unless fully qualified with a trailing dot. This is an implementation quirk that everydns.net realizes leads to newbie errors and confusion; therefore they eliminated it.

share|improve this answer

The short answer.. Well, has honestly already been documented here. :) Basically and put succinctly, "It says so in the RFC, mate."

Have a look at this link

"No, that dot in the domain name of the URL is not a mistake."

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.