Networking

DNS Record Types

Every common DNS record type with its IANA type number and defining RFC: A is type 1, AAAA 28, CNAME 5, MX 15, TXT 16, SRV 33, HTTPS 65 and CAA 257, with zone-file examples.

A DNS record type tells a resolver what kind of data a record holds. The everyday ones are A (type 1, an IPv4 address), AAAA (type 28, an IPv6 address), CNAME (type 5, an alias), MX (type 15, a mail server), TXT (type 16, text such as SPF and DKIM), NS (type 2) and SOA (type 6) for zone delegation, PTR (type 12) for reverse lookups, SRV (type 33) for service locations, HTTPS (type 65) and CAA (type 257). IANA keeps the official list of type numbers, and each type is defined by an RFC; both are given for every row below, along with a zone-file example. To see the records a real domain publishes, query it with the DNS Lookup tool.

Common record types

TypeIANA type numberDefined inWhat it holdsZone-file example
A1RFC 1035One IPv4 address (32 bits) for the name.www.example.com. 3600 IN A 192.0.2.10
AAAA28RFC 3596One IPv6 address (128 bits).www.example.com. 3600 IN AAAA 2001:db8::10
CNAME5RFC 1035The canonical name this name is an alias of. No other data may sit at the same name.shop.example.com. IN CNAME shops.example.net.
MX15RFC 1035, RFC 5321Mail exchanger: a preference number (lowest is tried first) and a host name. The host must not be an alias.example.com. IN MX 10 mail.example.com.
NS2RFC 1035An authoritative name server for the zone. Must not be an alias.example.com. IN NS ns1.example.com.
SOA6RFC 1035, RFC 2308Start of authority: primary server, admin mailbox (first dot = @), 32-bit serial, refresh, retry, expire (seconds) and the negative-caching TTL.example.com. IN SOA ns1.example.com. hostmaster.example.com. 2026100601 7200 3600 1209600 3600
PTR12RFC 1035, RFC 3596Reverse lookup: the name for an address, stored under in-addr.arpa (IPv4, octets reversed) or ip6.arpa (IPv6, nibbles reversed).10.2.0.192.in-addr.arpa. IN PTR www.example.com.
TXT16RFC 1035One or more text strings of up to 255 bytes each. Used for SPF (RFC 7208), DKIM keys, DMARC policies and domain-ownership checks.example.com. IN TXT "v=spf1 mx -all"
SRV33RFC 2782Where a service runs: priority (lowest first, 0–65535), weight (share among equal priorities), port and target host, under _service._proto.name._sip._tcp.example.com. IN SRV 10 60 5060 sip.example.com.
CAA257RFC 8659Which certificate authorities may issue certificates for the name. Tags: issue, issuewild, iodef. Flag 128 marks a tag as critical.example.com. IN CAA 0 issue "ca.example.net"
HTTPS65RFC 9460Connection hints for HTTPS: supported protocols (alpn, e.g. h3 for HTTP/3), port, address hints. Priority 0 is AliasMode, which can alias a zone apex where CNAME cannot be used.example.com. IN HTTPS 1 . alpn="h3,h2"
SVCB64RFC 9460The general form of HTTPS for any service, named _port._scheme. The example is an AliasMode record (priority 0) from RFC 9460._8443._foo.api.example.com. 7200 IN SVCB 0 svc4.example.net.
DNAME39RFC 6672Redirects every name below the owner to the same names under a new domain (a CNAME for a whole subtree).old.example.com. IN DNAME new.example.com.
NAPTR35RFC 3403Rewrite rules used by ENUM and SIP to turn a phone number or URI into a service and the next name to look up.order, preference, flags, service, regexp, replacement
TLSA52RFC 6698DANE: pins the TLS certificate or key for a port. Fields: certificate usage (0–3), selector (0 full cert, 1 public key), matching type (0 exact, 1 SHA-256, 2 SHA-512)._443._tcp.www.example.com. IN TLSA 3 1 1 (SHA-256 hex)
SSHFP44RFC 4255SSH host-key fingerprint: algorithm (1 RSA, 2 DSA, 3 ECDSA, 4 Ed25519, 6 Ed448) and fingerprint type (1 SHA-1, 2 SHA-256).host.example.com. IN SSHFP 4 2 (SHA-256 hex)
URI256RFC 7553Maps a _service._proto name to a URI, with priority and weight like SRV._ftp._tcp.example.com. IN URI 10 1 "ftp://ftp1.example.com/public"
LOC29RFC 1876 (experimental)Latitude, longitude, altitude and size of the host.example.com. IN LOC 42 21 54 N 71 06 18 W -24m 30m
HINFO13RFC 1035, RFC 8482Host CPU and OS strings. Rarely published today; servers may return a synthesised HINFO in answer to an ANY query.host.example.com. IN HINFO "RFC8482" ""
RP17RFC 1183 (experimental)The responsible person: a mailbox name and a name holding TXT contact details.example.com. IN RP hostmaster.example.com. contact.example.com.

DNSSEC record types

TypeIANA type numberDefined inWhat it holdsExample or fields
DNSKEY48RFC 4034A zone's public key. Flags 256 = zone key; 257 = zone key with the Secure Entry Point bit (a key-signing key). The protocol field must be 3.example.com. IN DNSKEY 257 3 13 (base64 key)
DS43RFC 4034Delegation signer, published in the parent zone: key tag, algorithm and a digest of the child's DNSKEY. Digest type 2 = SHA-256.example.com. IN DS 12345 13 2 (SHA-256 hex)
RRSIG46RFC 4034The signature over one record set, with algorithm, labels, original TTL, expiry and inception times, key tag and signer name.type covered, algorithm, labels, TTL, expiration, inception, key tag, signer, signature
NSEC47RFC 4034Authenticated denial of existence: the next name in the zone and the types present at this name.alpha.example.com. IN NSEC beta.example.com. A AAAA RRSIG NSEC
NSEC350RFC 5155Denial of existence using hashed names, so the zone cannot be walked name by name.hash algorithm, flags, iterations, salt, next hashed owner, types
NSEC3PARAM51RFC 5155The NSEC3 parameters a zone uses.example.com. IN NSEC3PARAM 1 0 0 -
CDS / CDNSKEY59 / 60RFC 7344Child copies of DS / DNSKEY that tell the parent which keys to publish, so key rollovers can be automated.same fields as DS / DNSKEY
ZONEMD63RFC 8976A digest of the whole zone, so a copy (such as the root zone) can be checked after transfer.serial, scheme, hash algorithm, digest

DNSSEC algorithm numbers you will see

Algorithm numberNameIANA guidance for signing (2026)Defined in
8RSA/SHA-256 (RSASHA256)RecommendedRFC 5702
13ECDSA P-256 with SHA-256 (ECDSAP256SHA256)RecommendedRFC 6605
15Ed25519RecommendedRFC 8080
14ECDSA P-384 with SHA-384MayRFC 6605
10RSA/SHA-512Not recommendedRFC 5702
5 / 7RSA/SHA-1 (and its NSEC3 alias)Must not (validation still recommended)RFC 3110, RFC 5155

Query-only and meta types

TypeIANA type numberDefined inWhat it does
OPT41RFC 6891EDNS(0) pseudo-record in the additional section (a meta type, although its number sits in the data range). Advertises a UDP payload size larger than the original 512-byte limit and carries option codes.
AXFR252RFC 1035, RFC 5936Request a full zone transfer (normally only allowed to secondary servers).
IXFR251RFC 1995Request only the changes since a given SOA serial.
* (ANY)255RFC 1035, RFC 8482Ask for all records at a name. Since RFC 8482 (2019), a server may answer with one record set or a synthesised HINFO instead.
TSIG250RFC 8945Shared-secret signature on a DNS message (used for zone transfers and dynamic updates).
TKEY249RFC 2930Establishes the shared secret used by TSIG.
NXNAME128RFC 9824Signals NXDOMAIN inside Compact Denial of Existence answers.

Obsolete and discontinued types

TypeIANA type numberStatus (per the IANA registry and RFC)Use instead
SPF99Discontinued: RFC 7208 says SPF must be published as TXTTXT (16)
A638Obsolete; moved to Historic by RFC 6563AAAA (28)
MD / MF3 / 4Obsolete in RFC 1035MX (15)
MAILA254ObsoleteMX (15)
MB / MG / MR7 / 8 / 9Experimental in RFC 1035, never widely used—
NXT30Obsolete (RFC 3755)NSEC (47)
SIG / KEY24 / 25Replaced for zone signing by RFC 4034; SIG still carries SIG(0) transaction signaturesRRSIG (46) / DNSKEY (48)
DLV32769Obsolete; moved to Historic by RFC 8749DS in the parent zone
NSAP / NSAP-PTR22 / 23Deprecated—

Rules that trip people up

  • CNAME stands alone. "If a CNAME RR is present at a node, no other data should be present" (RFC 1034 §3.6.2). So a CNAME cannot sit at a zone apex, which must hold SOA and NS. DNSSEC is the exception: RRSIG and NSEC records may accompany a CNAME (RFC 4035).
  • MX, NS and SRV targets must not be aliases. RFC 2181 §10.3 says the name in an NS or MX record must not be an alias and must have address records; RFC 2782 says the same for an SRV target. Additional-section processing does not follow CNAMEs, so an alias here costs extra lookups or fails.
  • PTR may have more than one record. RFC 2181 §10.2 says there is no rule limiting a name to one PTR, though the value of each must be a canonical name, not an alias.
  • Size limits (RFC 1035 §2.3.4): a label (the part between dots) is at most 63 bytes and a whole name at most 255 bytes. A plain DNS message over UDP is at most 512 bytes; EDNS(0) (RFC 6891) lets the two sides agree on a larger size, and anything still too big is retried over TCP.
  • TXT strings are a length byte followed by the text, so each string holds at most 255 bytes; a longer value (such as a 2048-bit DKIM key) is split into several quoted strings in one record.
  • TTL is a 32-bit field but RFC 2181 §8 limits it to 0 to 2,147,483,647 seconds (231 − 1).
  • SOA minimum (the last SOA field) now means the TTL for caching negative answers (NXDOMAIN and "no data"); a resolver uses the lower of that field and the SOA record's own TTL (RFC 2308). Its original meaning as the zone's minimum TTL is deprecated.
  • Unknown types can still be written and transferred using the generic syntax of RFC 3597: e.example. IN TYPE731 \# 6 abcd..., where TYPE731 is the number and \# 6 is the data length in bytes.

How type numbers are allocated

Range (decimal)Range (hex)Use (RFC 6895)
00x0000Reserved; marks SIG(0) and other special cases, never allocated
1–1270x0001–0x007FData types (A, NS, MX, TXT, AAAA …)
128–2550x0080–0x00FFQuery and meta types, assigned from 255 downward (ANY 255, AXFR 252, TSIG 250). OPT is the exception: a meta type that was given 41.
256–61,4390x0100–0xEFFFData types (URI 256, CAA 257 …; TA 32768 and DLV 32769 sit here)
61,440–65,2790xF000–0xFEFFReserved for future use (IETF Review)
65,280–65,5340xFF00–0xFFFEPrivate use
65,5350xFFFFReserved (Standards Action)

Sources

  • IANA, Domain Name System (DNS) Parameters: Resource Record (RR) TYPEs, registry last updated 28 August 2026 (iana.org/assignments/dns-parameters). Every type number on this page, and the obsolete/deprecated labels, are from the downloaded CSV of this registry.
  • IANA, DNS Security Algorithm Numbers and DS RR Type Digest Algorithms, 2026 (iana.org/assignments/dns-sec-alg-numbers, iana.org/assignments/ds-rr-types): algorithm numbers 5, 7, 8, 10, 13, 14, 15 and the signing guidance column; digest type 2 = SHA-256.
  • IANA, DNS SSHFP Resource Record Parameters (iana.org/assignments/dns-sshfp-rr-parameters): SSHFP algorithm and fingerprint-type numbers.
  • IETF RFCs, read from rfc-editor.org: RFC 1034 and RFC 1035 (Mockapetris, November 1987: types A, NS, CNAME, SOA, PTR, MX, TXT, HINFO, size limits); RFC 2181 (Elz & Bush, July 1997: alias rules, TTL range, PTR); RFC 2308 (March 1998: negative caching and the SOA minimum); RFC 2782 (February 2000: SRV); RFC 3596 (October 2003: AAAA, ip6.arpa); RFC 3597 (September 2003: unknown types); RFC 4034 and RFC 4035 (March 2005: DNSSEC records); RFC 5155 (March 2008: NSEC3); RFC 5321 (October 2008: MX preference order); RFC 6672 (June 2012: DNAME); RFC 6698 (August 2012: TLSA); RFC 6891 (April 2013: EDNS(0)); RFC 6895 (April 2013: type ranges); RFC 7208 (April 2014: SPF in TXT); RFC 7344 (September 2014: CDS/CDNSKEY); RFC 8482 (January 2019: ANY); RFC 8659 (November 2019: CAA); RFC 8976 (February 2021: ZONEMD); RFC 9460 (November 2023: SVCB and HTTPS). Each RFC is linked from the row that cites it.
  • Documentation names and addresses: RFC 2606 (example.com), RFC 5737 (192.0.2.0/24) and RFC 3849 (2001:db8::/32). The SOA timer values in the example are illustrative, not a recommendation from any RFC.

Frequently asked questions

What is the difference between an A record and an AAAA record?

An A record (type 1, RFC 1035) holds one 32-bit IPv4 address, such as 192.0.2.10. An AAAA record (type 28, RFC 3596) holds one 128-bit IPv6 address, such as 2001:db8::10. A name can have both, and a client that supports IPv6 usually asks for both.

Can a CNAME record exist alongside other records?

No. RFC 1034 says that if a CNAME is present at a name, no other data should be present there (DNSSEC signatures are the exception). That is why you cannot put a CNAME at a zone apex such as example.com, which must hold SOA and NS records. The HTTPS and SVCB records of RFC 9460 were designed partly to give apex names CNAME-like aliasing.

Can an MX record point to a CNAME?

No. RFC 2181 section 10.3 says the name in an MX or NS record must not be an alias; it must have its own address records. RFC 2782 says the same for the target of an SRV record. Point MX at a host name that has A or AAAA records.

What does the number in an MX record mean?

It is the preference. RFC 5321 says senders sort MX records by preference and try the lowest number first, so MX 10 is tried before MX 20. Records with the same number share the load in random order.

Is there still a separate SPF record type?

No. Type 99 (SPF) was used during SPF's experimental phase, but RFC 7208 (2014) says SPF policies must be published as TXT records (type 16) and that use of the alternative type has been discontinued.

Was this article helpful?