Skip to content
Question Section
step 1/5

Reading — step 1 of 5

Read

~1 min readDNS Wire Format

Question Section

After the header, the Question section holds (typically) ONE question:

+----------+
| QNAME    |   encoded name (variable length)
+----------+
| QTYPE    |   16-bit type
+----------+
| QCLASS   |   16-bit class (almost always IN = 1)
+----------+

Common QTYPE values:

TypeNumberMeaning
A1IPv4 address
NS2name server
CNAME5canonical alias
SOA6start of authority
PTR12reverse lookup (IP -> name)
MX15mail exchanger
TXT16arbitrary text (often verification)
AAAA28IPv6 address
SRV33service location
ANY255any (deprecated; many resolvers reject)

QCLASS is almost always IN (Internet, value 1). The other classes (CH/Chaos, HS/Hesiod) are historical curiosities.

Multiple questions (QDCOUNT > 1) are allowed by the spec but unsupported in practice — every implementation expects exactly one question per query.

Discussion

Ask a question, share an insight, or help someone who’s stuck.

Sign in to post a comment or reply.

Loading…