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
| Type | IANA type number | Defined in | What it holds | Zone-file example |
|---|---|---|---|---|
| A | 1 | RFC 1035 | One IPv4 address (32 bits) for the name. | www.example.com. 3600 IN A 192.0.2.10 |
| AAAA | 28 | RFC 3596 | One IPv6 address (128 bits). | www.example.com. 3600 IN AAAA 2001:db8::10 |
| CNAME | 5 | RFC 1035 | The 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. |
| MX | 15 | RFC 1035, RFC 5321 | Mail 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. |
| NS | 2 | RFC 1035 | An authoritative name server for the zone. Must not be an alias. | example.com. IN NS ns1.example.com. |
| SOA | 6 | RFC 1035, RFC 2308 | Start 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 |
| PTR | 12 | RFC 1035, RFC 3596 | Reverse 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. |
| TXT | 16 | RFC 1035 | One 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" |
| SRV | 33 | RFC 2782 | Where 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. |
| CAA | 257 | RFC 8659 | Which 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" |
| HTTPS | 65 | RFC 9460 | Connection 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" |
| SVCB | 64 | RFC 9460 | The 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. |
| DNAME | 39 | RFC 6672 | Redirects 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. |
| NAPTR | 35 | RFC 3403 | Rewrite 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 |
| TLSA | 52 | RFC 6698 | DANE: 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) |
| SSHFP | 44 | RFC 4255 | SSH 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) |
| URI | 256 | RFC 7553 | Maps 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" |
| LOC | 29 | RFC 1876 (experimental) | Latitude, longitude, altitude and size of the host. | example.com. IN LOC 42 21 54 N 71 06 18 W -24m 30m |
| HINFO | 13 | RFC 1035, RFC 8482 | Host 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" "" |
| RP | 17 | RFC 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
| Type | IANA type number | Defined in | What it holds | Example or fields |
|---|---|---|---|---|
| DNSKEY | 48 | RFC 4034 | A 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) |
| DS | 43 | RFC 4034 | Delegation 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) |
| RRSIG | 46 | RFC 4034 | The 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 |
| NSEC | 47 | RFC 4034 | Authenticated 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 |
| NSEC3 | 50 | RFC 5155 | Denial of existence using hashed names, so the zone cannot be walked name by name. | hash algorithm, flags, iterations, salt, next hashed owner, types |
| NSEC3PARAM | 51 | RFC 5155 | The NSEC3 parameters a zone uses. | example.com. IN NSEC3PARAM 1 0 0 - |
| CDS / CDNSKEY | 59 / 60 | RFC 7344 | Child copies of DS / DNSKEY that tell the parent which keys to publish, so key rollovers can be automated. | same fields as DS / DNSKEY |
| ZONEMD | 63 | RFC 8976 | A 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 number | Name | IANA guidance for signing (2026) | Defined in |
|---|---|---|---|
| 8 | RSA/SHA-256 (RSASHA256) | Recommended | RFC 5702 |
| 13 | ECDSA P-256 with SHA-256 (ECDSAP256SHA256) | Recommended | RFC 6605 |
| 15 | Ed25519 | Recommended | RFC 8080 |
| 14 | ECDSA P-384 with SHA-384 | May | RFC 6605 |
| 10 | RSA/SHA-512 | Not recommended | RFC 5702 |
| 5 / 7 | RSA/SHA-1 (and its NSEC3 alias) | Must not (validation still recommended) | RFC 3110, RFC 5155 |
Query-only and meta types
| Type | IANA type number | Defined in | What it does |
|---|---|---|---|
| OPT | 41 | RFC 6891 | EDNS(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. |
| AXFR | 252 | RFC 1035, RFC 5936 | Request a full zone transfer (normally only allowed to secondary servers). |
| IXFR | 251 | RFC 1995 | Request only the changes since a given SOA serial. |
| * (ANY) | 255 | RFC 1035, RFC 8482 | Ask for all records at a name. Since RFC 8482 (2019), a server may answer with one record set or a synthesised HINFO instead. |
| TSIG | 250 | RFC 8945 | Shared-secret signature on a DNS message (used for zone transfers and dynamic updates). |
| TKEY | 249 | RFC 2930 | Establishes the shared secret used by TSIG. |
| NXNAME | 128 | RFC 9824 | Signals NXDOMAIN inside Compact Denial of Existence answers. |
Obsolete and discontinued types
| Type | IANA type number | Status (per the IANA registry and RFC) | Use instead |
|---|---|---|---|
| SPF | 99 | Discontinued: RFC 7208 says SPF must be published as TXT | TXT (16) |
| A6 | 38 | Obsolete; moved to Historic by RFC 6563 | AAAA (28) |
| MD / MF | 3 / 4 | Obsolete in RFC 1035 | MX (15) |
| MAILA | 254 | Obsolete | MX (15) |
| MB / MG / MR | 7 / 8 / 9 | Experimental in RFC 1035, never widely used | — |
| NXT | 30 | Obsolete (RFC 3755) | NSEC (47) |
| SIG / KEY | 24 / 25 | Replaced for zone signing by RFC 4034; SIG still carries SIG(0) transaction signatures | RRSIG (46) / DNSKEY (48) |
| DLV | 32769 | Obsolete; moved to Historic by RFC 8749 | DS in the parent zone |
| NSAP / NSAP-PTR | 22 / 23 | Deprecated | — |
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) |
|---|---|---|
| 0 | 0x0000 | Reserved; marks SIG(0) and other special cases, never allocated |
| 1–127 | 0x0001–0x007F | Data types (A, NS, MX, TXT, AAAA …) |
| 128–255 | 0x0080–0x00FF | Query 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,439 | 0x0100–0xEFFF | Data types (URI 256, CAA 257 …; TA 32768 and DLV 32769 sit here) |
| 61,440–65,279 | 0xF000–0xFEFF | Reserved for future use (IETF Review) |
| 65,280–65,534 | 0xFF00–0xFFFE | Private use |
| 65,535 | 0xFFFF | Reserved (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.