You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/app-service/overview-name-resolution.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,41 +9,41 @@ ms.author: madsd
9
9
10
10
# Name resolution (DNS) in App Service
11
11
12
-
Your app uses DNS when making calls to dependent resources. Resources could be Azure services such as Key Vault, Storage or Azure SQL, but it could also be web apis that your app depends on. When you want to make a call to for example *myservice.com*, DNS is used to resolve the name to an IP. This article describes how App Service is handling name resolution and how it determines what DNS servers to use. The article also describes settings you can use to configure DNS resolution.
12
+
Your app uses DNS when making calls to dependent resources. Resources could be Azure services such as Key Vault, Storage or Azure SQL, but it could also be web apis that your app depends on. When you want to make a call to for example *myservice.com*, you're using DNS to resolve the name to an IP. This article describes how App Service is handling name resolution and how it determines what DNS servers to use. The article also describes settings you can use to configure DNS resolution.
13
13
14
14
## How name resolution works in App Service
15
15
16
-
If your app isn't integrated with a virtual network and you haven't configured custom DNS, your app will use [Azure DNS](../virtual-network/virtual-networks-name-resolution-for-vms-and-role-instances.md#azure-provided-name-resolution). If your app is integrated with a virtual network, your app uses the DNS configuration of the virtual network. The default for virtual network is also to use Azure DNS, but through the virtual network it's also possible to link to [Azure DNS private zones](../dns/private-dns-overview.md) and use that for private endpoint resolution or private domain name resolution.
16
+
If you aren't integrating your app with a virtual network and you haven't configured custom DNS, your app uses [Azure DNS](../virtual-network/virtual-networks-name-resolution-for-vms-and-role-instances.md#azure-provided-name-resolution). If you integrate your app with a virtual network, your app uses the DNS configuration of the virtual network. The default for virtual network is also to use Azure DNS. Through the virtual network, it's also possible to link to [Azure DNS private zones](../dns/private-dns-overview.md) and use that for private endpoint resolution or private domain name resolution.
17
17
18
-
If your virtual network is configured with a list of custom DNS servers, name resolution will use these servers. If your virtual network is using custom DNS servers and you're using private endpoints, you should read [this article](../private-link/private-endpoint-dns.md) carefully. You'll also need to consider that your custom DNS servers will have to resolve any public DNS records need for your app either by forwarding requests to a public DNS server including Azure DNS in the list of custom DNS servers.
18
+
If you configured your virtual network with a list of custom DNS servers, name resolution uses these servers. If your virtual network is using custom DNS servers and you're using private endpoints, you should read [this article](../private-link/private-endpoint-dns.md) carefully. You also need to consider that your custom DNS servers have to resolve any public DNS records need for your app. Your DNS configuration needs to either forward requests to a public DNS server or include a public DNS server like Azure DNS in the list of custom DNS servers.
19
19
20
-
The individual app allows you to override the DNS configuration by specifying the `dnsServers` property in the `dnsConfiguration` site property object. You can specify up to five custom DNS servers. Custom DNS servers can be configured using the Azure CLI.
20
+
The individual app allows you to override the DNS configuration by specifying the `dnsServers` property in the `dnsConfiguration` site property object. You can specify up to five custom DNS servers. You can configure custom DNS servers using the Azure CLI:
The existing `WEBSITE_DNS_SERVER` app setting can still be used, and you can add custom DNS servers with either setting. If you want to add multiple DNS servers using the app setting, the servers must be separated by commas with no blank spaces added.
26
+
You can still use the existing `WEBSITE_DNS_SERVER` app setting, and you can add custom DNS servers with either setting. If you want to add multiple DNS servers using the app setting, you must separate the servers by commas with no blank spaces added.
27
27
28
-
When your app needs to resolve a domain name using DNS, a name resolution request is sent to all configured DNS servers. DNS server responses will be evaluated in the order the servers are configured, however if a higher order server doesn't respond within the configured timeout, it will fall back to the next server in the list.
28
+
When your app needs to resolve a domain name using DNS, the app sends a name resolution request to all configured DNS servers. The app evaluates the DNS server responses in the order you've configured the servers. If a higher order server doesn't respond within the configured timeout, it will fall back to the next server in the list.
29
29
30
30
**Note:** When using custom DNS servers from your virtual network and if your virtual network had more than two custom DNS servers configured, Windows code apps used to sort the servers, and only use the first two servers. This behavior has changed for new apps, but hasn't changed for existing apps to maintain backwards compatibility.
31
31
32
-
If you would like to adopt the new behavior of using up to five servers in the order they're specified in the virtual network for Windows code apps, you can run this CLI command:
32
+
If you would like to adopt the new default behavior for Windows code apps, you can run this CLI command:
33
33
34
34
```azurecli-interactive
35
35
az rest --method POST --uri <app-resource-id>/disableVirtualNetworkDnsSorting?api-version=2022-03-01
36
36
```
37
37
38
-
To verify if your app is using legacy sort ordering, you can run this command that will return true if it's still using legacy sort order.
38
+
To verify if your app is using legacy sort ordering, you can run this command. The command returns true if it's still using legacy sort order.
39
39
40
40
```azurecli-interactive
41
41
az resource show --resource-group <group-name> --name <app-name> --resource-type "Microsoft.Web/sites" --query "properties.dnsConfiguration.dnsLegacySortOrder"
42
42
```
43
43
44
44
## Configure name resolution behavior
45
45
46
-
If you require fine-grained control over name resolution, App Service allows you to modify the default behavior. We allow you to modify retry attempts, retry timeout and cache timeout. Default timeout for retry attempts is 3 seconds, and you can configure it from 1-30 seconds. Default retry count is 1, but you can configure up to five retry attempts. DNS Cache timeout can be configured from 0-60 seconds. Default is 30 seconds and 0 means caching is disabled. Disabling or lowering cache duration may impact performance.
46
+
If you require fine-grained control over name resolution, App Service allows you to modify the default behavior. We allow you to modify retry attempts, retry timeout and cache timeout. Default timeout for retry attempts is 3 seconds, and you can configure it from 1-30 seconds. Default retry count is 1, but you can configure up to five retry attempts. You can configure DNS Cache timeout from 0-60 seconds. Default is 30 seconds and 0 means you've disabled caching. Disabling or lowering cache duration may influence performance.
47
47
48
48
>[!NOTE]
49
49
> Windows Container apps currently does not support changing the name resolution behavior.
0 commit comments