Skip to content

Common DNS records explained

typefull nameexample (subdomain, record type, TTL, data)description
NSName serverns1 1h ns-cloud1.googledomains.com.domain/subdomain to name server mapping; name server holds the resource records and returns corresponding ip address
AAddress record@ A 1h 123.123.123.123domain name to IPv4 address mapping
AAAAIPv6 Address recordwww AAAA 1h 2002:db80:1:2:3:4:567:89abdomain name to IPv6 address mapping
CNAMECanonical namewww CNAME 1h example.com.maps a domain to another domain
TXTText record@ TXT 1h "key=arbitrary-value-here"stores arbitrary text, often used for SPF, DKIM, or domain verification
MXMail exchange@ MX 1h 10 mailhost2.example.com.domain name to mail server mapping; can specify priority
CAACertification Authority Authorizationexample.com. IN CAA 0 issue "letsencrypt.org"let certain CA to issue certificates for the domain

Basic concepts

Each record will comprise of the following data:

  • subdomain:
    • sometimes also just called name
    • associates a subdomain with a record (when there is no IP addresses associated, it's not really a subdomain, thus name)
    • "@" means the root domain
  • record type: from a list of commonly agreed values. Some DNS provider might also have custom record types
  • TTL: time to live, how long the record can be cached
  • data: a string. format varies depending on the record type
  • priority (optional): you can define multiple records with the same type on the same subdomain, for fallback / load balancing purposes.

Commands to inspect DNS records

There are many come installed, I usually only use these two:

  • host example.com: for human readable result
  • dig example.com: for raw result

for a specific record type, use

  • host -t <record-type> example.com
  • dig example.com <record-type>

Further Reading

Created on 2020-09-17

Last updated on 2025-04-17