gpt4 book ai didi

dns - CNAME 记录中的 * 是否优先于显式子域?

转载 作者:行者123 更新时间:2023-12-03 10:21:28 27 4
gpt4 key购买 nike

我在我的域上定义了一组子域,如下所示:

CNAME sub1.example.com -> sub1.herokuapp.com
CNAME sub2.example.com -> sub2.appspot.com
CNAME www.example.com -> example.herokuapp.com

现在我想添加 CNAME *.example.com -> example.herokuapp.com捕获那些输入太多 WWW 或输入其他缺失子域的人。但会不会 *优先于明确定义的子域还是子域会继续按预期工作?

如果它有所作为,我正在使用 Route53。

最佳答案

通配符将只匹配区域中未以其他方式定义的记录。

RFC 1912 ,它提到 MX记录在这里,但同样适用于 CNAME s:

2.7 Wildcard records

Wildcard MXs are useful mostly for non IP-connected sites. A common
mistake is thinking that a wildcard MX for a zone will apply to all
hosts in the zone. A wildcard MX will apply only to names in the
zone which aren't listed in the DNS at all. e.g.,

podunk.xx. IN NS ns1
IN NS ns2
mary IN A 1.2.3.4
*.podunk.xx. IN MX 5 sue

Mail for mary.podunk.xx will be sent to itself for delivery. Only
mail for jane.podunk.xx or any hosts you don't see above will be sent
to the MX. For most Internet sites, wildcard MX records are not
useful. You need to put explicit MX records on every host.

关于dns - CNAME 记录中的 * 是否优先于显式子域?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14757475/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com