Pages

Friday, August 11, 2017

Use of Dot in DNS Zone File

When a period is at the end of a value it tells name server that we do not want the domain name added to the end of that value.

If we leave the dot out, then the domain name will be added to the domain to the end of the value.

For Eg:

Correct Entries

example.com.    NS    ns1.example.com.
example.com.    NS    ns1

Incorrect Entries

example.com.    NS    ns1.example.com

Above Line will again try to add domain.com in the end it will become like ns1.example.com.example.com.

In simple if there  is a dot at the end of a name in a resource record or directive, the name is qualified and it is the whole name including the host, and it is a Fully Qualified Domain Name – FQDN and the resource record is unchanged.

If there is NO dot at the end of the name then the name is unqualified and DNS adds the value of the domain in the end.

In the absence of an $ORIGIN directive the zone name from the named.conf file for this zone is used as an $ORIGIN directive.

What is Origin Directive

$ORIGIN

Appends the domain name to unqualified records, such as those records without dot in the resource record.

For example, a zone file may contain the following line:
$ORIGIN example.com.

Any names used in resource records that do not end in a trailing period (.) are appended with example.com.

Note : The use of the $ORIGIN directive is unnecessary if the zone is specified in /etc/named.conf because the zone name is used as the value for the $ORIGIN directive by default.

No comments:

Post a Comment