DNS · DNS & connectivity

DNS records explained: A, AAAA, MX, TXT, NS, CNAME, SOA

Published 2026-10-05

When you type a domain into a browser, the browser asks DNS for the IP address behind it. But DNS does more than map names to IPs — it carries mail routing information, security policies, ownership verification, and a half-dozen other records. This post walks through each major one and what it actually does.

TL;DR

Every DNS record type has a purpose. A and AAAA point to IPs. MX routes mail. TXT carries SPF, DKIM, DMARC. NS delegates to a nameserver. Here is what each one does.

A and AAAA: pointing to IPs

A records carry IPv4 addresses (32 bits). AAAA records carry IPv6 addresses (128 bits). A domain can have both, and clients will prefer IPv6 if their network supports it. A typical small site has 1–2 A records (one for the apex domain, one for www).

MX: mail exchange

MX records specify which servers accept email for the domain. Each MX has a priority — lower numbers are tried first. A typical setup is 1 mx1.provider.com and 10 mx2.provider.com, so if mx1 is down the fallback is automatic. Email deliverability checks start by looking up the MX record to confirm mail can reach the domain.

TXT: the catch-all

TXT records started as human-readable notes but became the carrier for SPF, DKIM, DMARC, site verification (Google, Microsoft, Facebook), and various other policies. A domain might have 5–10 TXT records for different purposes. They are read by mail servers, by site verifiers, and sometimes by humans debugging DNS. The format is a sequence of strings, each up to 255 characters.

NS, CNAME, SOA

NS records delegate the domain (or a subdomain) to a set of authoritative nameservers. CNAME records alias one name to another — api.example.com CNAME example.com means both names resolve to the same IPs. SOA (Start of Authority) is the first record in every zone file; it carries the primary nameserver, admin email, and zone serial number that secondary servers use to detect changes.

Try it →

Run the DNS lookup tool on sitetrace.it.com — paste a value and get an instant answer.

Open DNS lookup