DNS record types explained: A, MX, TXT, HTTPS, PTR and more

By TechCompare · Updated · How we check

Most domains live on A, AAAA, CNAME, MX, TXT and NS. SOA, HTTPS, SRV, PTR, CAA and the DNSSEC types (DS, DNSKEY and TLSA) cover zone settings, browsers, services, reverse lookups, certificates and signatures.

A DNS record type says what kind of data a name holds. An A record holds an IPv4 address, an MX record names mail servers, and a TXT record holds free text. Ask a resolver for a name and a type, and you get back only the records of that type. A busy domain uses a dozen types at once, each for a different job.

Topic
DNS record types
Overview
Category
Record types
What each record does

How this is calculated

The common types, and what each one holds:

  • A: an IPv4 address, like 192.0.2.10.
  • AAAA: an IPv6 address (RFC 3596).
  • CNAME: an alias. The name takes all its records from another name, so it can't hold any other record itself.
  • MX: the mail servers for the domain, each with a priority number. Lower is tried first.
  • TXT: free text. SPF, DKIM keys, DMARC policies and verification codes all live here.
  • NS: the name servers that answer for the zone.
  • CAA: which certificate authorities may issue TLS certificates for the name (RFC 8659).
  • SOA: the zone's settings. It names the primary name server and a contact address, holds a serial number that goes up with each change, and sets timers, including how long resolvers keep a "doesn't exist" answer (RFC 2308).
  • HTTPS: connection hints for browsers (RFC 9460). It lists the HTTP versions a site offers, like HTTP/3, can give addresses up front, and can carry an ECH key that hides the site name during the TLS handshake (RFC 9849).
  • SRV: the host and port for a named service, like _imaps._tcp for IMAP mail or _xmpp-server._tcp for XMPP chat (RFC 2782).
  • PTR: the name for an IP address, stored under in-addr.arpa for IPv4 and ip6.arpa for IPv6.
  • DNSKEY and DS: DNSSEC keys. DNSKEY holds the zone's public keys, and a DS record at the parent zone vouches for one of them (RFC 4034).
  • TLSA: certificate pins for DANE (RFC 6698). Mail servers publish them at _25._tcp, so sending servers know which certificate to expect (RFC 7672).

One name can hold records of many types at once. The exception is CNAME, which can't share its name with any other record. The top of a domain always has SOA and NS records, so it can't be a CNAME. Some DNS hosts offer an alias for the top of a domain anyway, often called ALIAS or CNAME flattening, and turn it into A and AAAA answers themselves.

The DNS Lookup asks for A, AAAA, CNAME, MX, TXT, NS and CAA by default. Open More records for SOA, HTTPS, DS, DNSKEY, SRV and DANE, or type an IP address to get its PTR record.

Verdict

Check the type that matches the job. A and AAAA for a website, MX and TXT for mail, CAA before you order a certificate. When a whole domain misbehaves, look at NS, SOA and DS next, since a wrong name server or a broken DNSSEC link takes every record down with it. Check PTR for a mail server's address and HTTPS when a site should offer HTTP/3.

More DNS scenarios

TXT records
The free text record that holds verification codes, SPF, DKIM keys and DMARC policies.
View details
SPF vs DKIM vs DMARC
SPF checks the sending server, DKIM checks the message, and DMARC ties both to the From address.
View details
MX records
How senders find your mail servers, what the priority number does, and the null MX for domains that take no mail.
View details

Frequently asked questions

How many DNS record types are there?
IANA's registry lists many, but most are rare, experimental or retired. A typical domain uses A, AAAA, MX, TXT and NS, plus CNAME for aliases. SOA, CAA, HTTPS, SRV and the DNSSEC types round out what you'll meet in practice.
What's the difference between HTTPS and SVCB records?
They share one format (RFC 9460). HTTPS is the version for websites, which browsers ask for before they connect. SVCB is the general version for other protocols, and it sits under a name that starts with the service, like _dns.resolver.example for a DNS server.
Which record do I need to point a domain at a website?
An A record for IPv4, and an AAAA record if the server has IPv6. A subdomain like www can use a CNAME to your host's name instead. The top of the domain can't be a CNAME, so use A and AAAA there, or your DNS host's ALIAS or flattening feature.