Adding custom domain - Azure App Service Vaidation

Stephen Sam 1 Reputation point
2022-09-21T06:30:15.027+00:00

Hello, Team. I have a question about adding a Custom Domain to Azure App Service. Let me explain my question. When we add a custom domain to Azure App service, a windows prompt with an A record and a txt record appears. I can send it to my client so he can enter the records in the domain provider's DNS Zone. That is fine. However, after adding the records, I have to click the Validate button to finish the process. If I have 100 clients who require a custom domain for my app hosted in App service, it would be difficult for us to click the Validate button individually.
Is there a way to fix this? Do you provide an API for custom domain validation that I can integrate into my app so that clients can click there after adding DNS records?

validate-domain-name.png

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,865 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Takahito Iwasa 4,841 Reputation points MVP
    2022-09-21T22:08:54.023+00:00

    Hi, @Stephen Sam

    You can get a custom domain verification ID or IP address from the API.
    I got it earlier with the CLI, check below.

    https://dev.classmethod.jp/articles/app-service-custom-domain-asuid-cli/

    Additionally, adding domains can be automated if you have created validating DNS records.

    Use az webapp config hostname add.

    https://learn.microsoft.com/en-us/cli/azure/webapp/config/hostname?view=azure-cli-latest#az-webapp-config-hostname-add