The Domain Name System (DNS) is the Internet's phone book. It maps a name, e.g www.x4b.net to an IP Address like 74.125.136.113 or 2a00:1450:4013:c01::8b.

What is in a Domain?

What is commonly referred to as a 'domain' is actually made up of multiple parts. For example www.x4b.net is made up of:

  1. www the subdomain
  2. x4b.net the root domain
  3. .net the Top Level Domain (TLD)

The Zone

A zone describes a group of records belonging to domain name. This includes all sub-domains.

For example the zone for example.org could look like:

$ORIGIN example.org.
$TTL 1h

example.org.    IN  SOA example.org. admin.dns.email.com. (
 2014030501
 1d
 2h
 4w
 1h
 )

example.org.    NS  ns1.dns.net.
example.org.    NS  ns2.dns.net.
example.org.    SOA ns1.dns.net admin.dns.email.com 2014030501

# Important parts below
example.org          A       74.125.136.113
ipv6.example.org     AAAA    2a00:1450:4013:c01::8b
mail.example.org     A       74.125.136.112
example.org          MX      mail.example.org

The parts of the zone above above the "Import parts" are generally provided by your DNS provider and only matter if you are hosting your own DNS with Bind (and not using management software or a webui).

All records must be contained within a zone, a zone is usually (basic configuration) defined as the domain name. i.e your zone name is most likely "example.org" and not "www.example.org"

Records

A record is a specific number in the phone book (i.e mobile number). When queried the DNS server will return a mapping from the requested pretty name to one or more IP addresses (A), to a further name to query (CNAME) or to other information (SPF, TXT, etc).

A/AAAA Record

An A record matches a queried name to an IP address. This queried name is the full hostname as it appears in the url e.g www.x4b.net, x4b.net or doesnotexist.x4b.net. In other words, it points your domain name to an IP address, which allows traffic to reach your Website, Gameserver or other service. This is the core functionality of DNS. A typical A record looks like the following:

example.org          A       74.125.136.113

A records for sub-domains use the same format:

ipv6.example.org          A       74.125.136.113

If you have a single-homed service you can use this record type to point at your X4B protected IP address. However it is recommended instead that you use a CNAME record.

AAAA Record

The AAAA record is the IPV6 variant of the A record. It has the same format, except that an IPV6 value is provided instead.

ipv6.example.org          AAAA       2a00:1450:4013:c01::8b

A single sub-domain can have both A records and AAAA records. The client software, and network will be responsible for choosing the appropriate record. e.g

www.example.org          AAAA       2a00:1450:4013:c01::8b
www.example.org          A          74.125.136.113

CNAME Record

A Canonical Name record is a record used to specify that a domain record uses the IP addresses of another domain record, the "canonical" domain.

One use of this record is most useful in preventing duplicate definitions when running multiple services on a single IP. For example instead of

irc.example.org          A          74.125.136.112
www.example.org          A          74.125.136.113
ftp.example.org          A          74.125.136.113

a configuration utilizing CNAME records could be used

irc.example.org          A          74.125.136.112
www.example.org          A          74.125.136.113
ftp.example.org      CNAME          www.example.org

Another common use, and what is used on X4B services is to allow a third party domain administrator to make changes or perform advanced configuration (e.g GeoDNS) in a centeral location. In this case the CNAME record points to an external domain defined by a DNS server controlled by the third party. e.g.

irc.example.org          A          74.125.136.112
www.example.org       CNAME         lease-xxxxxx.clients.x4b.me

In the example given, lease-xxxxxx.clients.x4b.me would be returned on a query for www.example.org the DNS client (for a non-recursive query) would then lookup the value of lease-xxxxxx.clients.x4b.me

MX Record

Mail eXchange records define one or many servers to attempt to deliver mail to for a specific domain. Domains without MX records can not receive mail.

Multiple MX records can be defined with varying priorities. The MX record with the lowest priority is preferred.

Load Distribution

Round Robin Load Balancing will occur when multiple MX records with the same priority exist. This can be used to load balance the load between servers for busy mail services.

Backup MX

A target server, i.e. one that knows how to deliver to the relevant user's e-mail mailbox is typically one which is the most preferred. Lower priority servers, a.k.a. backup MX or secondary MX, usually keep the messages in a queue waiting for the primary server to become available. If both servers are online or in some way connected to one another, the backup MX will typically queue a message briefly and immediately forward it to the primary MX. The backup MX acts as a store and forward mail server.

See Wikipedia for more information

NS Record

Delegates a DNS zone or record to use the given authoritative name servers. Generally speaking you should not need to make modifications here, the X4B DNS system manages these records for you.

PTR Record

A PTR Record is a record used to define the Reverse DNS (rDNS) value of an IP address. These records do not appear in your own domain zones and exist within the .arpa TLD.

An example for a PTR record for the IPv4 address (1.2.3.4) could be

4.2.3.1.in-addr.arpa          PTR          dns-example.x4b.net

You can set PTR records (rDNS) from the IP Addresses page of your service in the X4B Dashboard.

SOA

An SOA is a Start of Authority record. Every domain must have a Start of Authority record. You do not need to add this record to your domain. We (X4B) add and manage this record for our DNS manager.

DKIM & SPF

A DKIM record is used to store the DomainKeys Identified Mail public key for verification with the signatures of received outgoing mail. This verification ensures that the email sent did infact come from the domain name and was not spoofed.

A SPF record provides a similar assurance by acting as a whitelist of IP addresses that are allowed to send email from a specific domain. An example of what this could look like is:

example.org. IN SPF "v=spf1 ip4:192.0.2.0/24 ip4:198.51.100.123 a -all"

"v=" defines the version of SPF used (spf1). Following is the mechanisms to use to determine if for a domain a sender is eligible to send mail. The "ip4" and "a" specify the systems permitted to send messages for the given domain. The "-all" at the end specifies that, if the previous mechanisms did not match, the message should be rejected.

For more information see Wikipedia: SPF and Wikipedia: DKIM

TXT

A TXT record is a record that exists to store textual data up to 255 characters (including length byte). This has no functional effect on DNS lookups.

Less Basic Features

Not advanced, but not as simple features.

Round Robin

If multiple records for the same name and type are defined they will be round robin balanced. For example,

www.example.org          A          74.125.136.112
www.example.org          A          74.125.136.113

In this case half of the connecting clients should connect to 74.125.136.113, while the other half to 74.125.136.112

Root Records

Root records are records that are defined for the domain name of the zone itself. i.e example.org. These records may be represented in many ways.

The simplest way would be the full name:

example.org          A          74.125.136.112

Some web-based user interfaces however require the @ symbol to be used for the root record, these are commonly systems that only take the subdomain (and not {subdomain}.domain.com) for record names. For example:

@            A          74.125.136.112
www          A          74.125.136.112

Another way this could be represented is with an empty record name.

Root record as CNAME

A CNAME for the root record is technically a violation of the RFC. While a violation, it is commonly supported by DNS servers and clients, albeit with possible issues due to its non-standard nature.

The free DNS hosting provided by Hurricane Electric supports CNAME records for the root record. Our DNS system allows this limitation to be worked around using the "X4B Service" record type for X4B services (including Geolocated / Multihomed).

For more information see:

  • http://tools.ietf.org/html/rfc1912 section '2.4 CNAME Records'
  • http://www.faqs.org/rfcs/rfc1034.html section '3.6.2. Aliases and canonical names'