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

Dns CNAME记录中的*是否优先于显式子域?,dns,cname,amazon-route53,Dns,Cname,Amazon Route53,我在我的域上定义了一组子域,如下所示: 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或键入其他缺少子域的用户。但是*会优先于显式定义的子

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

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或键入其他缺少子域的用户。但是
*
会优先于显式定义的子域,还是子域会继续按预期工作


如果有区别的话,我使用的是53路

不,定义的子域应优先于通配符。

通配符将只匹配区域中未定义的记录

请参阅,此处提到了
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.

嗯,是的。RFC引用是SO的参数结束符。