【Azure 应用服务】添加自定义域时,Domain ownership 验证无法通过  - LuBu0505/My-Code GitHub Wiki

问题描述

在Azure App Service添加自定义域名时,遇见了Domain ownership 验证无法通过的问题?

https://raw.githubusercontent.com/LuBu0505/My-Code/main/wiki_pic/2021051003.png

问题解决

因为DNS中配置App Service默认域名和自定义域名的CNAME记录后,在App Service中需要验证该域名的所有权,所以需要在DNS中在增加一条TXT记录,并且指定名称为asuid,它的值需要从App Service中获取。

https://raw.githubusercontent.com/LuBu0505/My-Code/main/wiki_pic/2021051004.png

获取App Service的验证ID:https://docs.azure.cn/zh-cn/app-service/app-service-web-tutorial-custom-domain#get-a-domain-verification-id

https://raw.githubusercontent.com/LuBu0505/My-Code/main/wiki_pic/2021051005.png

参考资料

将现有的自定义 DNS 名称映射到 Azure 应用服务:https://docs.azure.cn/zh-cn/app-service/app-service-web-tutorial-custom-domain#create-the-cname-record