What a DNS record is
A DNS record is one line of instructions in a domain’s zone. Each has a name, a type, a value, and a TTL (how long resolvers may cache it). The type decides what the value means.
The most common record types
| Type | Purpose | Example value |
|---|---|---|
| A | Points a name to an IPv4 address | 203.0.113.10 |
| AAAA | Points a name to an IPv6 address | 2001:db8::10 |
| CNAME | Makes a name an alias of another name | shop.example.com to stores.example.net |
| MX | Says which servers receive email, with a priority | 10 mail.example.com |
| TXT | Free text, used for SPF, DKIM, DMARC, and ownership checks | v=spf1 include:_spf.example.net ~all |
| NS | Names the authoritative nameservers for the zone | ns1.provider.com |
| SOA | Zone metadata: primary server, serial, timers | one per zone |
| CAA | Limits which certificate authorities may issue certificates | 0 issue “letsencrypt.org” |
A and AAAA
These are the basic address records. A site reachable over both IPv4 and IPv6 has both. A missing or wrong AAAA record is a classic cause of “works for some visitors only”, because IPv6-capable clients try it first.
CNAME
A CNAME says “this name is really that other name”. Two rules cause most mistakes. A name with a CNAME cannot have other records (such as MX or TXT) at the same name. And the root of the domain (example.com itself) normally cannot be a CNAME, because it must hold NS and SOA records. Many providers offer an ALIAS or flattened CNAME for that case.
MX
Each MX record has a priority number; the lowest number is tried first. Several MX records give you backup mail servers. The value must be a hostname, never an IP address, and that hostname must have its own A or AAAA record.
TXT
TXT records carry text for other systems:
- SPF lists the servers allowed to send mail for your domain.
- DKIM publishes a public key at a name like
selector._domainkey.example.com. - DMARC sets a policy at
_dmarc.example.com. - Verification tokens prove to a service that you control the domain.
A domain should have only one SPF record. Two separate SPF TXT records make SPF fail.
NS and SOA
NS records tell the world which servers are authoritative for the zone. The registrar publishes them at the parent (for example the .com registry), and they should match what is in your zone. SOA holds the serial number and timers that matter for secondary servers and negative caching.
CAA
CAA records name the certificate authorities allowed to issue certificates for the domain. If none is listed, any authority may. A CAA that omits your actual provider will make certificate issuance fail.
Checking records
Enter the name and type in the DNS Propagation Checker to see what public resolvers return, or run dig example.com MX. For why a change is not showing yet, read why DNS changes are not showing.
FAQ
Can I have a CNAME and an A record on the same name?
No. A name with a CNAME must not have any other record type.
What TTL should I use?
300 to 3600 seconds suits most records. Use a shorter value just before a planned change and a longer one afterwards.
Why does my MX record point to a name instead of an IP?
Mail servers look the name up to get its address. An IP address in an MX record is invalid.