Setting up DNS Zones to use wildcard nested subdomains

Andre Fuller 1 Reputation point
2022-07-27T22:00:13.81+00:00

We have a domain that we want to serve different information based on 2 levels of subdomain.

For example (using contoso.com):

contoso.com is our main site.

john.contoso.com is a subdomain that leads to john's profile. Getting this far I am able to do and have successfully deployed something along these lines our production application.

The issue however is in the following:

If I want john's project to be at project1.john.contoso.com I have no way of doing this without manually adding in every single user into each web app's custom domains that our traffic manager redirects to. (*.{userName}.contoso.com) which isn't scalable or feasible at all.

I've tried adding the custom domain wildcard.wildcard.contoso.com (wildcard insterted for asterisks because they aren't showing up in the post correctly) in the custom domains but that doesn't work because you're required to add the asuid TXT entry in the DNS zone. However when I try and add . to the DNS zone I get an error saying a wildcard character cannot be used in this way.
225866-recordset-attempt.png

How should I proceed?

I think this article had a similar question, but the rep ended up speaking with them privately and not giving a public solution:
https://learn.microsoft.com/en-us/answers/questions/405316/can-a-web-app-be-set-up-to-securely-serve-wildcard.html

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
605 questions
Azure Traffic Manager
Azure Traffic Manager
An Azure service that is used to route incoming network traffic for high performance and availability.
111 questions
{count} votes