AZ-104 Question 185
Single answerYou have an Azure App Service named myapp.azurewebsites.net and a custom domain contoso.com registered with a third-party DNS provider. You need to configure www.contoso.com to point to this Azure App Service. Which option describes the correct steps you must take from your domain registrar’s settings?
- A
Create a CNAME record pointing www.contoso.com to myapp.azurewebsites.net and a TXT record for domain verification, then add the custom domain in the Azure portal.
- B
Create an A record pointing contoso.com to the App Service IP address and ignore any domain verification steps, as Azure doesn’t require them for root domains.
- C
Replace the existing name server (NS) records with Azure’s default credentials and automatically stop hosting the domain at the third-party registrar.
- D
Change the domain contact email address to match the administrator of the Azure App Service and wait for DNS propagation.
Show answer and explanation
Correct answer: A
Explanation
To map an existing custom subdomain (e.g., www.contoso.com) to Azure App Service, you typically create a CNAME record pointing to the default app service domain (myapp.azurewebsites.net). Azure also requires you to verify domain ownership by creating a valid TXT record. Once verified, you configure the custom domain in the App Service settings.
- A. Correct.
Creating a CNAME record from www.contoso.com to myapp.azurewebsites.net and a TXT record for domain verification is the standard approach for mapping a custom subdomain to an Azure App Service. After DNS changes, you add the custom domain in the App Service settings to complete the process.
- B. Incorrect.
Pointing the root domain via an A record to the App Service IP alone does not suffice for subdomain delegation. Azure also requires domain verification to prove ownership when mapping custom domains, so additional verification steps are still necessary.
- C. Incorrect.
Replacing the NS records with Azure’s name servers is only necessary if you choose to host your DNS zone on Azure DNS. It does not automatically map custom domains to an App Service, and you would still need to configure zone settings properly.
- D. Incorrect.
Changing the domain contact email has no effect on DNS mapping. It neither sets up domain verification nor points the domain to the App Service.