AZ-104 Question 186
Single answerYou manage an Azure App Service named contosoapp.azurewebsites.net. You have a custom domain named contoso.com, purchased from a third-party registrar. You want to map www.contoso.com so that it resolves to contosoapp.azurewebsites.net. Which step must you perform to properly complete this configuration?
- A
Create a CNAME record for www.contoso.com pointing to contosoapp.azurewebsites.net, then add this custom domain in the Azure App Service Custom domains page.
- B
Enable forced HTTPS in the Azure App Service settings to ensure the domain mapping is accepted.
- C
Create and verify a TXT record for contoso.com in Azure DNS, linking it to the default *.azurewebsites.net domain.
- D
Purchase an SSL certificate from Azure, then configure a new custom domain binding.
Show answer and explanation
Correct answer: A
Explanation
To map an existing custom DNS name to an Azure App Service, you must add a CNAME record on the domain registrar for the subdomain pointing to the default *.azurewebsites.net domain and then add the custom domain within the App Service settings. This ensures both DNS resolution and ownership verification are completed correctly.
- A. Correct.
Creating a CNAME record for your subdomain and adding the custom domain in the App Service is the correct approach to map the domain and confirm ownership.
- B. Incorrect.
Enabling forced HTTPS is optional for secure connections but not a mandatory step for mapping a custom domain.
- C. Incorrect.
A TXT record alone is used to verify domain ownership in some contexts, but specifically mapping www.contoso.com requires a CNAME record and configuration in the App Service.
- D. Incorrect.
Purchasing an SSL certificate is only required if you plan to enable HTTPS on the custom domain, but it does not directly map the domain to the App Service.