我想向多个 Azure WebApp 添加通配符主机名,例如*.mydomain.com
我已阅读https://learn.microsoft.com/en-us/azure/app-service/app-service-custom-domain-name-migrate这表明我可以使用 TXT DNS 记录抢先绑定(bind)域名。
To verify domain ownership, Add a TXT record. The TXT record maps from awverify. to .azurewebsites.net.
我尝试添加 awverify.* TXT myapp.azurewebsites.net
但收到错误消息:
Each label must only contain letters, numbers, underscores, and/or dashes. Each label should be separated from other labels by a period. A wildcard ('*' character) is permitted either as the single character in the name, or as the first label in the name.
我想将通配符域分配给多个 WebApp,它们无需停机即可更改特定子域的 DNS CName。
这怎么可能?
最佳答案
How can add the same wildcard hostname to multiple Azure web apps?
简而言之不可能。
当您将通配符主机名添加到另一个应用服务时,似乎已经存在与此 DNS 区域同名的记录集。 您只能拥有一个等于 * 的 HOST。
也许您可以在不同的 Azure 服务计划中使用 *.domain.com 来添加主机名
,但您无法访问它。
顺便说一句,您可以使用 CNAME 记录
或 A 记录
将自定义 DNS 名称映射到应用服务。
要映射到应用的默认主机名 .azurewebsites.net 的 TXT 记录。应用服务仅在配置时使用此记录来验证您是否拥有自定义域。在应用服务中验证并配置您的自定义域后,您可以删除此 TXT 记录。
更多详情可以引用这个article .
关于azure - 如何将相同的通配符主机名添加到多个Azure Web应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52738612/