Azure 上的通配符子域 [英] Wildcard subdomains on Azure
问题描述
我正在尝试设置一个 Azure 站点,以便它可以处理所有(通配符)子域,并且每次新客户注册时都不需要手动添加 CNAME
记录和选择一个子域,如 xyz.mysite.com
我正在遵循本指南:
I'm trying to get an Azure site set up so that it will handle all (wildcard) subdomains, and not require any manual addition of a CNAME
record every time a new customer signs up and chooses a subdomain like xyz.mysite.com
I'm following this guide: https://blogs.msdn.microsoft.com/waws/2015/12/01/mapping-a-wildcard-domain-name-to-an-azure-app-services-web-app-website/
I'm temporarily using a the domain www.joburger.co.za
I've created the A
, CNAME
& TXT
records on the domain (did them all to be sure). In Azure, I've added the hostname www.joburger.co.za and it works.
In Azure, I can also add another hostname for a subdomain, like test.joburger.co.za, and it works too.
But if I don't add a hostname in Azure, then it doesn't work.
How do I get Azure to handle the wildcards without having to manually add the hostnames each time?
In your domain manager make sure you have...
- CNAME
*
entry that points toyourapp.azurewebsites.net
- CNAME
awverify
entry that points toawverify.yourapp.azurewebsites.net
Then in Azure, go to your App Service
> Custom Domains
and add a hostname *.yourdomain.com
. This validates that the hostname is valid and if everything's good you can add the new wild card entry to your hostnames list.
这篇关于Azure 上的通配符子域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!