DNS - Types of Records

Initially DNS have records of the types A, CNAME, NS and MX. Later the types AAAA, SRV and TXT were added.

Records of type A

Records of type A are the base of DNS. Today they are one of two types of records that allow us to find the servers who handle requests for a service, but originally records of type A were the way.

Records of type A - from Address - translate the names of the systems/services into IP Addresses, which can then be used to connect to the servers.

Os registos de DNS do tipo A são a razão inicial da existência do sistema de resolução de nomes, e o tipo de registos que dá nome ao serviço. Este é, hoje, um dos dois tipos de registos que se destinam a fazer o que o nome diz… resolver nomes.

Os registos do tipo A – de Address – servem para relacionar os nomes de dominios com os endereços IP – os tais números dos servidores de que falamos em artigos anteriores.

As an example:

neversmind.site   IN  A   64.225.82.153

This record tells us that the name neversmind.site is served by the computers with the IP 69.60.115.53.

Records AAAA

The internet did grow to a point that the number of IPs initially available are not enough anymore. Today there are computers in the big majority of the houses, and more and more people have one in their hand (or pocket) - the Smartphones.

To overcome this problem a new set of IP address was created (and named IPv6).

Records AAAA work just like records A, but for IPv6, instead of IPv4.

Records CNAME

A Record CNAME says that a name is an alternative name for some other name. The most obvious consequence of this is that to get the address of this name we have to ask for the address of the name indicated by the CNAME record.

CNAME records also have implications with records of type MX - see DNS - Email - MX and CNAME records for details.

For now, the quick memo, a CNAME record says that the name we are looking at is a second name, an alias, for the name in the record.

Records NS

The NS record is what makes the name hierarchy work. This record points to the DNS server that is responsible for keeping the DNS records of a domain.

In practice, when we configure a NS record we are indicating who are the servers who know how to reply to DNS queries for a domain (or subdomain).

Records MX

Records MX point to the email server of a domain (or subdomain).

In practice, when we have an email like email@example.com, our email server is going to ask the DNS server of the domain example.com where is the email server for the domain, meaning, it is going to ask which are the MX records of the domain, and then it sends the email to (one of) the servers indicated by the response.

Records SRV

Records SRV are used to define which servers handle a given service for a domain.

This type of records are used to support several types of services that are based on the domain, and they allow federated addressing with an account that is based on the domain (for instance xmpp://<user>@<domain.com>).

The exception to this is email, as the email have its own DNS record type (MX).

Records TXT

Records TXT are used to public information connected with the domain. This records are small text files, and they can contain any public information related with the doman.

One common information that can be found in TXT records is the public key of the emails servers, that are used to validate that an email address comes is really from the domain it says it comes from.

Other types of DNS records

There are several other record types used for specific services, some more common than others, but the types listed above are the most common ones.