Azure App Service unable to resolve hostname of Virtual Machine on Vnet

James Fleming 21 Reputation points

I have setup a virtual machine on a vnet to which an app service is connected to via vnet integration. The app service is able to connect to the virtual machine when using its private IP address, but unable to when using its hostname or FQDN. All services are using the Azure provided DNS.

How can I resolve the virtual machine via its hostname rather than relying on its (dynamic) private IP address?

Many thanks,

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
1,182 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
4,612 questions
Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
396 questions
No comments
{count} votes

Accepted answer
  1. Didier3001 891 Reputation points Microsoft Employee

    Hi @James Fleming

    I believe you will need to configure the following for this to work:

    "After your app integrates with your VNet, it uses the same DNS server that your VNet is configured with. By default, your app won't work with Azure DNS Private Zones. To work with Azure DNS Private Zones you need to add the following app settings:

    WEBSITE_DNS_SERVER with value
    WEBSITE_VNET_ROUTE_ALL with value 1
    These settings will send all of your outbound calls from your app into your VNet in addition to enabling your app to use Azure DNS private zones."

    --I hope this helps. Please do not forget to "Accept the answer" and "Up-Vote" the answer or message(s) that helped you so that it can help others in the community looking for help on similar topics


    No comments

0 additional answers

Sort by: Most helpful