自建的权威 DNS 服务器能否当查询是 A 记录的时候应答 CNAME 记录?

2018-07-18 23:04:00 +08:00
 wonter

如题

这样是否符合 DNS 规范??

当用户查询某个域名的 A 记录,返回的是 CNAME 记录

1271 次点击
所在节点    问与答
2 条回复
Showfom
2018-07-19 01:01:42 +08:00
CNAME 会继承 TXT SOA MX 等记录,从而引起冲突,所以你怎么做都是不规范的
msg7086
2018-07-19 02:21:02 +08:00
RFC 1034 Domain Concepts and Facilities November 1987

[Page 15]

If a CNAME RR is present at a node, no other data should be present.

[Page 24]

If the data at the node is a CNAME, and QTYPE doesn't match CNAME, copy the CNAME RR into the answer section of the response, change QNAME to the canonical name in the CNAME RR, and go back to step 1.

所以当你 Zone 里对应域名节点是 CNAME 的时候,任何查询都应该返回 CNAME 记录,不论是 A 或者是 AAAA TXT MX 都一样。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/472172

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX