Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
Update the App Service Domain by sending an authenticated ARM PATCH containing only properties.nameServers, and omit dnsZoneId so the domain is delegated to the external DNS provider without being transferred.
1. Prepare the external DNS provider
Before changing delegation:
- Add all required website, email, verification, and other DNS records at the external provider.
- Copy the exact authoritative nameservers assigned to the domain.
- Confirm the App Service Domain is active and fully provisioned.
Changing delegation before recreating the records can interrupt the website, email, and other services.
2. Create the PATCH body
Save this as nameservers.json, replacing the example values:
{
"properties": {
"nameServers": [
"ns1.example-dns.com",
"ns2.example-dns.com"
]
}
}
Do not add dnsZoneId. If the domain currently uses Azure DNS, this operation is intended to replace that delegation with the listed external nameservers.
The domain PATCH model exposes nameServers as a string array ^1^. Microsoft’s domain update operation targets the App Service Domain resource and uses API version 2024-11-01 by default ^2^.
3. Send the request with Azure CLI
Sign in and select the subscription containing the domain:
az login
az account set --subscription "<subscription-id>"
az rest --method patch \
--url "https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/[Resource Group] Group]/providers/Microsoft.DomainRegistration/domains/<domain-name>?api-version=2024-11-01" \
--body @nameservers.json
az rest obtains a Microsoft Entra token from the signed-in Azure CLI session, adds the authorization header, and treats a valid JSON body as application/json ^3^.
Replace:
-
<subscription-id>with the subscription ID. -
<resource-group>with the App Service Domain’s resource group. -
<domain-name>with the full registered domain, such ascontoso.com.
The operation does not require access to the GoDaddy Domain Control Center and does not transfer the registration away from Azure. Consequently, a registrar-transfer waiting period is not part of this nameserver update.
4. Verify the result
Query the resource after the PATCH:
az rest --method get \
--url "https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/[Resource Group] Group]/providers/Microsoft.DomainRegistration/domains/<domain-name>?api-version=2024-11-01" \
--query "properties.nameServers"
Then verify public delegation using a DNS or WHOIS lookup. Allow time for registrar publication and cached DNS data to expire.
If the request fails
-
403 Forbidden: confirm Azure CLI is using the tenant and subscription that own the domain. Selecting the wrong subscription or tenant can produce a 403 ^4^. The signed-in identity must also be authorized to update the domain resource. -
404 Not Found: check the subscription ID, resource group, domain name, and that the resource type is exactlyMicrosoft.DomainRegistration/domains. - Validation error mentioning
dnsZoneId: resend the minimal body above without that property. - Successful PATCH but unchanged public delegation: retain the full request/response and timestamp, then reopen the Microsoft support case. Ask support to inspect the
Microsoft.DomainRegistration/domainsupdate operation rather than redirecting to the registrar portal.
The deployment template documentation does not list nameServers among the normal creation-time domain properties ^5^. That does not invalidate this PATCH approach: nameServers is documented separately on the domain update/PATCH model, which includes update-only fields not exposed by the deployment schema.
References