Understanding the Domain Name System and DNS records

The Domain Name System (DNS) is a crucial component of the internet. Simply said, DNS ensures that to visit a website we don't need to remember the complicated IP address , but a domain name

Computers and servers use IP addresses to find each other on the internet, not domain names. DNS translates the domain names we type in our browser window or our mail program to the IP addresses.

Building blocks of the system 

DNS records are crucial in the operation of DNS. They are the building blocks of the DNS as it were. When you visit a website, your browser submits a request to a DNS resolver to find the website's IP address. The DNS resolver quickly searches through all necessary records in all involved DNS servers to find the correct information and sends it back to your browser, allowing the connection to be made. 

Imagine you want to send a letter (no, not an email, a real, old-school letter, on paper and in an envelope with a stamp) to a friend. You only have his name and not his address. You call a mutual friend who you know keeps meticulous records, and ask him for the address. The friend goes through his filing cabinet full of address books, finds the address in the address book, and gives it to you so you can send your letter. 

In this example the mutual friend is the DNS resolver, the filing cabinet with the address books is the DNS system: the collection of all DNS servers. The friend's name whose address you're looking for is the domain name. The address book in question constitutes the DNS record and the address is the IP address.

Different types of DNS records

Like the friend in the example with the address book, who also has a book with his favourite recipes and a list of his vast record collection, there are many different DNS records. They contain information about a domain and tell servers how to respond to incoming 'queries' from computers. Each type of DNS record has a specific function and helps manage various aspects of a domain.

A record (Address Record)

An A record (Address Record) ensures that when you type a domain name, you're directed to the correct IPv4 address. For instance, the A record for 'example.be' might point to '192.0.2.1'.

AAAA record

An AAAA record does exactly the same as an A record, but points to an IPv6 address. The AAAA record for ‘example.be’ may point to ‘2001:0db8:85a3:0000:0000:8a2e:0370:7334’.

FeatureA recordAAAA record
Address typeIPv4IPv6
Bit length32-bit128-bit
PurposeMaps domain names to IPv4 addressesMaps domain names to IPv6 addresses
Introduced1983 (with the start of DNS)1999
CapacityOver 4 billion addresses340 undecillion addresses
UsagePredominant during the early years and still widely used nowIncreasingly adopted due to the exhaustion of IPv4 addresses
CompatibilityUniversally supportedSupported by modern systems that have IPv6 capability
NotationDotted decimal (e.g., 192.168.0.1)Hexadecimal with colons (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334)
Transition technologyN/ADual-stack, tunneling, NAT64/DNS64

CNAME record 

A CNAME record (Canonical Name Record) creates an alias for a domain name. 

An alias is an alternative name for a domain. CNAME records allow multiple domain names to point to the same content without needing multiple A or AAAA records.

Let's say that ‘example.be’ and  ‘blog.example.be’ are on the same domain. If this is the case you can create a CNAME record to let 'blog.example.be' point to 'example.be' as an alias instead of a separate A or AAAA record. 

Why aliases?

  • Easy management. CNAME records mean you only need to manage one set of DNS records. If you change the IP address of 'example.be,' 'blog.example.be' is automatically updated because it's an alias.
  • Consistency. Aliases ensure that different domain names point to the same content.
  • Flexibility. You can easily add new subdomains without extra configuration, as long as they all point to the same source.

MX record 

MX records (Mail Exchange Record) ensure that emails are sent to the correct address by specifying the mail servers for a domain. For instance, the MX record for ‘example.be’ could point to ‘mail.registrar.be’.

TXT record

A TXT record may contain random text and is used for different purposes. For instance, it can be used to verify domain ownership and to set SPF records for email verification. 

A TXT record with a specific verification code is added to your domain's DNS settings. The entity verifying domain ownership, such as Google, checks this code which is essential for accessing services such as Google Search Console. 

An SPF record (Sender Policy Framework) is a type of TXT record that specifies which mail servers are authorised to send emails on behalf of your domain and helps email providers to verify that an email was genuinely sent from your domain.

A DKIM record gives every email a digital public and private key signature. The record shows that the email was effectively sent from the domain it claims to come from. The public key is hosted in a TXT record coupled to the domain.

A DMARC record is a TXT record that refers to the domain's SPF and DKIM policy. It's an important document to prevent spam and phishing emails by misuse of domain names.

Speed and reliability

DNS records also play a key role in the speed and reliability of internet connections. A well configured DNS, i.e. with correctly set DNS records containing the right information – may reduce the loading time of websites and ensure that users always have access to the right information. 

On the other hand, poorly configured DNS records lacking essential information may result in long loading times and even inaccessible websites.