DigiCert KnowledgeBase - Technical Support-hero

Knowledge Base

Formatting a zone file

Solution ID : SO69
Last Modified : 10/21/2023

Formating a zone file is easier than you think! You can access RFC 1035 for further information on how zone files are defined. 

ZONE FILE FORMAT

Overall, in DNS Made Easy, you can import your zone files by following the BIND zone file format as shown below. If you have all the records you need from your current provider, you can use the zone below as a sample and replace the domain name with yours and its respective values and import your domain into DNS Made Easy.  You may also choose your own TTL value

 

EXAMPLE 1:

$ORIGIN yourdomain.com.

www.yourdomain.com. 3600 IN A 162.243.171.9
app.yourdomain.com. 3600 IN A 162.243.171.9
mail.yourdomain.com. 3600 IN A 162.243.171.9

yourdomain.com. 1200 IN AAAA ::1
app.yourdomain.com. 1200 IN AAAA ::1

yourdomain.com. 1200 IN CAA 0 issue "letsencrypt.org"

yourdomain.com. 1200 IN MX 10 mail

yourdomain.com. 1200 IN TXT "v=spf1 mx a ~all"

payroll.yourdomain.com. 1200 IN NS youexternalserver.com.

portal.yourdomain.com. 3600 IN CNAME www.yourdomain.net.

_sip._tls.yourdomain.com. 1200 IN SRV 100 10 5660 sipdir.online.lync.com.

EXAMPLE 2: A shorter version of your zone file

  • You can also make this file shorter by only stating the hostname of your record since the $ORIGIN will make it so all the records have the domain name ( yourdomain.com) appended to the name. 
  • If no record name is included, then the default name will be the one mentioned within your $ORIGIN variable. For instance, the CAA record below refers to yourdomain.com, whereas the NS record refers to payroll.yourdomain.com. 
$ORIGIN yourdomain.com.

www 3600 IN A 162.243.171.9
app 3600 IN A 162.243.171.9
mail 3600 IN A 162.243.171.9

 1200 IN AAAA ::1
app 1200 IN AAAA ::1

 1200 IN CAA 0 issue "letsencrypt.org"

 1200 IN MX 10 mail

 1200 IN TXT "v=spf1 mx a ~all"

payroll 1200 IN NS youexternalserver.com.

portal 3600 IN CNAME www.yourdomain.net.

_sip._tls 1200 IN SRV 100 10 5660 sipdir.online.lync.com.

The Composition of Records in a zone file

A zone file is a collection of resource records with each record entry described in the following sequence:

Format:  Host Label TTL Record Class Record Type Record Data
Example:  yourdomain.com. 60 IN A 162.243.171.9

 

  • Host Label – A host label helps to define the hostname of a record and whether the $ORIGIN hostname will be appended to the label. Fully qualified hostnames terminated by a period will not append the origin.
  • TTL – The Time To Live (TTL) is the amount of time that a DNS record will be cached by an outside DNS server or resolver, in seconds.
  • Record Class – DNS Made Easy only uses the IN classes of records. 
  • Record Type – The type of a record, such as CNAME, AAAA, or TXT.
  • Record Data – The data within a DNS answer, such as an IP address, hostname, or other information. Different record types will contain different types of record data.

 

Things to consider when importing your zone files to DNS Made Easy:

When importing your zone files into DNS Made Easy, we will automatically create an SOA record  ( Start of Authority) for your domain. DNS Made Easy will also include the assigned name servers for the domain being imported. These are the same name servers that must be delegated to the domain's registrar so that your records can be propagated throughout the Internet. 

HTTP redirection records must be added manually as those are not technically a DNS record but instead an application-level protocol for distributed, collaborative, hypermedia information systems. ( RFC 2616 )