How to add Azure App Service Wildcard Custom Domian

155 Views Asked by At

I cannot seem to add a wildcard domain to an Azure App Service. I know I have done this in the past but I think the portal has changed.

There are several examples online of how to do this but all of them state you can enter a domain as "*.mydomain.com" which does not work thru the Azure portal.

I go into the my app's App Service page-->Custom Domains-->Add Custom domain. I select "All other domain services" and the Domain field appears. I want to enter *.mydomain.com but the portal will not allow an *.

How do you add a wildcard custom domain. I will have hundreds of subdomains in a multi-tenant app. I already have the wildcard cert and the CNAME and TXT records setup. Thanks

1

There are 1 best solutions below

1
SiddheshDesai On BEST ANSWER

To add a Wildcard Domain refer the steps from this MS Document.

Visit your Azure Web app > Custom Domains > For Wildcard domain to get accepted, Select Add certificate later option in TLS/SSL certificate > In domain add your wildcard domain like here:- *.contoso.com

enter image description here

Now visit your Domain registrar site and in the DNS records Add the below records for the Wildcard domain to work properly:-

enter image description here

In your DNS Record add the above CNAME and TXT records:-

Type- CNAME , 
Name- * ,
Data- webappname.azurewebsites.net,

Type- TXT, 
Name- asuid, 
Value - A189264E6xxxxx833044629E67A8D1AC75146808B3

Reference MS Document.

enter image description here