Skill 3.4.5

Map an existing custom DNS name to an App Service

Key Concepts

Custom domains require Basic or Shared tier and above (not Free). On the app's Custom domains page, Add custom domain shows the records to create at the DNS provider. A subdomain such as www uses a CNAME record pointing to name.azurewebsites.net. A root (apex) domain such as contoso.com uses an A record pointing to the app's inbound IP address, because CNAME records are not allowed at the apex. Both need a TXT record named asuid.subdomain (or asuid for the apex) containing the app's custom domain verification ID.

When the records resolve, App Service validates the domain and adds it, and a certificate binding secures it. Using a TXT verification record also allows a domain to be added before traffic is redirected, which avoids downtime during migrations. If the DNS zone is hosted in Azure DNS, an alias record can point the apex at the app. Domains bought as App Service domains are configured automatically.