DNS 记录参考
网络
实际遇到的 DNS 记录类型的快速参考 — 每种用途、陷阱(如 CNAME 不能放在 zone apex)、具体 zone file 示例。涵盖日常集合 + DNSSEC + 用于 HTTP/3 和 ECH 的新 SVCB / HTTPS 记录。
Maps a hostname to an IPv4 address. The most common record — every domain that resolves to a server has at least one.
Zone file 示例
example.com. IN A 93.184.216.34
Maps a hostname to an IPv6 address. Pronounced "quad-A".
Zone file 示例
example.com. IN AAAA 2606:2800:220:1:248:1893:25c8:1946
Aliases one hostname to another. The target must itself resolve; CNAMEs cannot coexist with other records at the same name, and cannot appear at the apex (root) of a zone.
Zone file 示例
www.example.com. IN CNAME example.com.
Mail exchanger — where SMTP for the domain should be delivered. Includes a priority (lower = preferred).
Zone file 示例
example.com. IN MX 10 mail.example.com.
Arbitrary text. Used for SPF (mail anti-spoofing), DKIM keys, domain verification (Google, Facebook, etc.), and human-readable notes.
Zone file 示例
example.com. IN TXT "v=spf1 include:_spf.google.com ~all"
Delegates a (sub)domain to a set of authoritative name servers. Every zone has NS records at its apex.
Zone file 示例
example.com. IN NS ns1.example.com.
Start of Authority — administrative info for the zone: primary name server, hostmaster email, serial number, and TTLs for negative caching.
Zone file 示例
example.com. IN SOA ns1.example.com. hostmaster.example.com. 2025010101 7200 3600 1209600 3600
Reverse lookup — maps an IP back to a hostname. Lives under the `in-addr.arpa` (v4) or `ip6.arpa` (v6) zones.
Zone file 示例
34.216.184.93.in-addr.arpa. IN PTR example.com.
Locates the host and port for a named service (with priority and weight). XMPP, SIP, and Microsoft AD all use SRV.
Zone file 示例
_sip._tcp.example.com. IN SRV 10 60 5060 sipserver.example.com.
Certification Authority Authorization — restricts which CAs may issue TLS certs for the domain. Modern CAs are required to check CAA before issuing.
Zone file 示例
example.com. IN CAA 0 issue "letsencrypt.org"
DNSSEC public key used to verify signatures in the zone. Paired with RRSIG records.
Zone file 示例
example.com. IN DNSKEY 257 3 13 mdsswUyr3DPW132mOi8V9xESWE8jTo0d…
Delegation Signer — published at the parent zone to fingerprint the child zone's DNSKEY. Forms the DNSSEC chain of trust.
Zone file 示例
example.com. IN DS 31589 13 2 3490A6806D47F17A34C29E2CE80E8A999FFBE4BE…
Resource Record Signature — cryptographic signature over a record set, validated against the zone's DNSKEY. Added automatically when the zone is signed.
Zone file 示例
example.com. IN RRSIG A 13 2 300 20260101000000 …
DNSSEC "authenticated denial of existence" — proves a record does not exist. NSEC3 hashes names to discourage zone walking.
Zone file 示例
example.com. IN NSEC www.example.com. A NS SOA MX TXT RRSIG NSEC
DANE — binds a TLS certificate (or its public key) to a hostname via DNSSEC. Lets clients verify certs without trusting a CA.
Zone file 示例
_443._tcp.example.com. IN TLSA 3 1 1 ABCD…
Service Binding — advertises alternative endpoints, ALPNs, port, and ECH config for a service. `HTTPS` is the HTTPS-specific subtype enabling HTTP/3 and ECH.
Zone file 示例
example.com. IN HTTPS 1 . alpn="h3,h2"
Rewrites a name to a URI / regex result. Used by ENUM and SIP for service discovery.
Zone file 示例
example.com. IN NAPTR 100 10 "u" "E2U+sip" "!^.*$!sip:info@example.com!" .
Geographic location — latitude, longitude, altitude. Rarely used in practice.
Zone file 示例
example.com. IN LOC 37 30 N 127 0 E 30m
A non-standard "flattened CNAME" supported by some providers (Route 53 alias, Cloudflare CNAME flattening). Lets you point the zone apex at another hostname.
Zone file 示例
example.com. IN ALIAS app.example.cdn.com.
使用方法
- 在搜索框输入类型 (`mx`) 或关键字 (`mail`、`dnssec`)。
- 查看描述和 zone file 示例。
- 点击类型徽章的复制按钮把记录名复制到 zone 文件。
常见问题
- 为什么 CNAME 不能放在 apex?
- 因为每个 zone 必须在 apex 提供 SOA 和 NS 记录,而 CNAME 不能与同名其他记录类型共存。用 ALIAS / ANAME(提供商特定的扁平化)或 HTTPS 记录绕过。
- SVCB 和 HTTPS 的区别?
- 都是 Service Binding 记录。`HTTPS` 是浏览器自动查询的 HTTPS 专用子类型 — 公告 HTTP/3 (`alpn=h3`)、替代端口和加密 Client Hello (ECH) 配置。`SVCB` 是用于其他协议的通用形式。
- 需要 CAA 吗?
- 技术上可选但强烈推荐 — 没有它任何公共 CA 都能为你的域名颁发证书。添加 `0 issue "letsencrypt.org"`(或你使用的 CA)将颁发限制到该机构。
相关工具
MAC 转 EUI-64 / 链路本地
把任意 MAC 地址转为 modified EUI-64 接口 ID 和对应的 IPv6 链路本地地址 — 与 Windows/Linux 自动计算结果相同的形式。
URL Query 构建器
用基础地址与可编辑的 key-value 查询参数组合 URL — 每对可开关、自动 percent 编码。
IP 地址检查器
输入 IPv4 或 IPv6 地址,查看其类、scope(私有 / 公共 / 回环 / 链路本地)、十进制值、二进制、反向 DNS 表示以及 /32 CIDR。
端口号参考
约 60 个标准 TCP / UDP 端口号的可搜索速查表 — 从 22 (SSH)、80 (HTTP) 到 6379 (Redis)、27017 (MongoDB)。
子网计算器(IPv4 / CIDR)
解析 IPv4 CIDR:网络地址、广播、子网掩码、通配符、主机范围、地址类。附二进制细节与公网/私网判定。
User Agent 解析器
把 User-Agent 字符串解析为浏览器、引擎、操作系统、设备、CPU。识别 20+ 种爬虫,含 GPTBot、ClaudeBot、PerplexityBot。