Skip to content
Network 8 min read

DNS Records Explained: A, AAAA, CNAME, MX, TXT, NS & How to Look Them Up

Understand every common DNS record type, what they do, how to query them, and how to debug DNS issues with public resolvers. Complete DNS reference for developers.

ToolsVito Team

DNS: The Internet's Directory Service

The Domain Name System (DNS) translates human-readable domain names into machine-routable IP addresses. When you type toolsvito.com, your browser queries DNS resolvers to find the IP address — all in a few milliseconds. DNS also handles mail routing (MX records), service discovery (SRV records), domain verification (TXT records), and dozens of other functions.

Core Record Types

A Record (Address)

Maps a domain name to an IPv4 address. The most fundamental DNS record:

example.com.    A    93.184.216.34

A domain can have multiple A records for load balancing (DNS round-robin). Each query returns all addresses in rotating order.

AAAA Record (Quad-A)

Maps a domain to an IPv6 address:

example.com.    AAAA    2606:2800:220:1:248:1893:25c8:1946

CNAME Record (Canonical Name)

Aliases one domain to another. The target must be another domain name, not an IP:

www.example.com.    CNAME    example.com.

Important rule: A CNAME cannot coexist with other records at the same name (except DNSSEC records). You cannot have both a CNAME and an MX record for the same hostname. This is a common misconfiguration.

MX Record (Mail Exchange)

Routes email for a domain to mail servers. The priority number tells senders which server to try first (lower = higher priority):

example.com.    MX    10    mail1.example.com.
example.com.    MX    20    mail2.example.com.

TXT Record (Text)

Arbitrary text data. Used for SPF (email authentication), DKIM keys, domain ownership verification (Google, Microsoft, Apple), and DMARC policies:

example.com.    TXT    "v=spf1 include:_spf.google.com ~all"
example.com.    TXT    "google-site-verification=abc123"

NS Record (Name Server)

Delegates a domain or subdomain to specific name servers:

example.com.    NS    ns1.example.com.
example.com.    NS    ns2.example.com.

Querying DNS Records

Use dig in the terminal for detailed DNS queries:

dig example.com A           # IPv4 address
dig example.com MX          # Mail servers
dig example.com TXT         # Text records
dig example.com ANY         # All records
dig @8.8.8.8 example.com    # Query a specific resolver

The +short flag gives clean output for scripting. The answer section shows the records; the authority section shows which name servers answered.

Common DNS Misconfigurations

  • CNAME at apex: The root domain (example.com) cannot be a CNAME per RFC — it must have A or AAAA records. Use ALIAS or ANAME records if your DNS provider supports them.
  • Missing glue records: When nameservers are within the domain they serve (ns1.example.com for example.com), the parent zone needs glue records with the IP addresses.
  • TTL surprises: Records are cached for their TTL duration. A 24-hour TTL means changes take up to a day to propagate. Lower TTLs (300s) before planned changes.
  • Stale NS records: Old name server records pointing to decommissioned servers cause intermittent resolution failures.

Look Up DNS Records Now

Use ToolsVito's DNS Record Lookup to query A, AAAA, CNAME, MX, TXT, NS, and other records for any domain via public resolvers. See results in a clean, organized table.

Try it now — free, runs in your browser

DNS Record Lookup

Query DNS records