DNS (Domain Name System) records are the entries in a DNS database that map domain names to IP addresses and other information about a domain. These records are used by DNS servers to resolve domain names to IP addresses, allowing users to access websites and other resources using human-readable domain names instead of IP addresses. There are several different types of DNS records, including A records, MX records, CNAME records, and NS records, each of which serves a specific purpose.
Information you can expect to be stored in DNS records includes: an associated IP address, domain name, time to live (TTL), class (most commonly IN meaning internet), and type (e.g. A, AAAA, etc.).
An example of how this can appear is as follows:
IP Address | 181.151.30.123 |
Domain Name | aoitcloud.com |
TTL | 3600 |
Class | IN |
Type | A |
DNS Record Types
There are a variety of different DNS record types that you should be aware of when considering utilising a DNS server. The following is a brief description of each type.
A Record (Address)
This type is most commonly used to map a fully qualified domain name (FQDN) to an IPv4 address, acting as a translator through converting domain names to their relevant IP addresses.
- AAAA Record (Quad A)
These records are similar to A records, although they map to IPv6 addresses rather than IPv4. This is advantageous as smartphones prefer IPv6 formatting where possible. - CNAME Record (Canonical Name)
This record acts as an alias which points to another domain or subdomain, whilst actively avoiding an IP address. This type of alias record mapping FQDN to FQDN directs multiple hosts to a single location. If you may want to change an IP address over time, this record type enables you to make changes without affecting user bookmarks, etc.
This record type can be used in place of a CNAME, differing by allowing you to point the root of your domain to a hostname or FQDN.
- SOA Record (Start of Authority)
This type stores information about domains and is used to direct how a DNS zone propagates to secondary name servers. - NS Record (Name Server)
This type of record specifies which name servers are authoritative for a domain or subdomains. However, these records should not be pointed to a CNAME record type.
- MX Record (Mail eXchange)
A mail eXchange record uses mail servers to map where to deliver email for a domain. This type needs to point to a mail server name, however, and not to an IP address.
- TXT (text) Record
This type of record allows administrators to add limited human and machine-readable notes and can be used for things such as email validation, site, and ownership verification, framework policies, etc., and doesn’t require specific formatting.
- SRV Record (service)
This record type allows services such as instant messaging or voice over IP (VoIP) to be directed to a separate host and port location.
- PTR Record (pointer)
This is a reverse of A and AAAA records, which maps IP addresses to domain names. These records require domain authority and can’t exist in the same zone as other DNS record types (put in reverse zones).
A final tip to consider when establishing your DNS records is to check for typos and any mistakes when inputting record information. Any IP addresses in particular are essential to get correct. The Zone Config File is a good place to check your work in order to identify and correct any mistyped information.