You plan to map a custom domain to an Azure App Service web app and secure it using a free App Service Managed Certificate. You need to configure this using the Azure CLI.
Which sequence of steps should you perform to map the domain and configure the certificate? Arrange the steps in the correct order.
- 1Retrieve the custom domain verification ID of the web app by running the `az webapp show` command.
- 2At your DNS registrar, create the required TXT verification record and CNAME record pointing to the default App Service hostname.
- 3Add the custom domain hostname to the web app by running the `az webapp config hostname add` command.
- 4Create the App Service Managed Certificate for the custom domain by running the `az webapp config ssl create` command.
- 5Bind the generated certificate to the custom domain by running the `az webapp config ssl bind` command.
Answer
The correct sequence is: first, retrieve the web app's custom domain verification ID; second, create the TXT and CNAME records at your DNS registrar; third, add the custom domain hostname to the web app; fourth, generate the App Service Managed Certificate; and fifth, bind the certificate to the custom domain using SNI.
To successfully configure a custom domain with an App Service Managed Certificate, you must perform the steps in a strict logical order. First, get the verification ID using `az webapp show`. Second, configure the TXT and CNAME records at your DNS registrar. Third, map the hostname using `az webapp config hostname add`. Fourth, generate the certificate using `az webapp config ssl create`. Finally, bind the certificate to the domain using `az webapp config ssl bind`.
Step-by-Step Solution
Key Concept
Azure App Service custom domain and SSL binding configuration requires verifying ownership via DNS records before adding hostnames, and binding the hostname before generating or assigning an App Service Managed Certificate.