通配符应该属于 CNAME 还是 A NAME?
通配符应该属于 CNAME 还是 A NAME? 两者对我来说看起来都是一样的,谷歌搜索给了我一个不确定的结果。
选择其中之一的背后有什么理由和含义吗? (底层 DNS 服务器软件?网络托管软件?速度?)
should wildcards belong to CNAME or A NAME? Both looks the same to me, and googling gives me a inconclusive result.
Any rational and implications behind for choosing one over the other? (underlying DNS server software? web hosting software? speed?)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为这实际上并不重要。
通配符可用于任何 DNS 记录类型,因此它不是 *.domain 的通配符,而是仅适用于特定记录类型的通配符。
RFC 4592
非常详细地涵盖了它们。
I don't think it practically matters.
A wildcard can be used for any DNS record type, so it's not a wildcard for *.domain it's a wildcard only for the particular record type.
RFC 4592
covers them in extreme detail.
您可以在 A 记录和 CNAMES 中添加通配符。
为什么要在 A 记录中添加通配符的典型示例是当您拥有专用 IP 地址时,例如 1.2.3.4。
如果有人访问 http://wildcard.mytestdomain.com,并且子域“wildcard”不存在,服务器将使用指定为通配符的 IP 地址进行响应。
A * 1.2.3.4
You can add wildcard in both A records and CNAMES.
The typical example of why would you want to add a wildcard in A records is when you have dedicated IP address, say 1.2.3.4.
if someone were to visit http://wildcard.mytestdomain.com, and the subdomain "wildcard" does not exist, the server will respond with the IP address specified as the wildcard.
A * 1.2.3.4