You are configuring a custom domain named `www.contoso.com` for an Azure App Service web app named `app-prod-westus`. You need to secure the custom domain using a free App Service Managed Certificate.
Which sequence of actions should you perform?
- 1Create a DNS CNAME record that points `www.contoso.com` to `app-prod-westus.azurewebsites.net`.
- 2Add the custom hostname `www.contoso.com` to the web app using `az webapp config hostname add`.
- 3Generate a free App Service Managed Certificate for `www.contoso.com` using `az webapp config ssl create`.
- 4Bind the generated certificate to the custom hostname using `az webapp config ssl bind` with the SNI SSL type.
Answer
First, create a DNS CNAME record pointing `www.contoso.com` to the default Azure Web Apps URL. Second, add the custom hostname `www.contoso.com` to the web app. Third, generate the free App Service Managed Certificate for the domain. Finally, bind the generated certificate to the custom hostname using SNI SSL.
To secure an App Service web app with a custom domain using a free App Service Managed Certificate, you must perform these steps in order. First, configure the DNS CNAME record pointing to the app's default hostname to allow ownership verification. Second, register the custom domain on the App Service. Third, request the managed certificate for the custom domain. Finally, bind the issued certificate to the hostname using SNI SSL.
Step-by-Step Solution
Key Concept
Azure App Service custom domain verification and free App Service Managed Certificate lifecycle management.