When you deploy resources into Azure Virtual Networks (VNets), one of the first critical services they rely on is DNS. Without proper name resolution, services can’t communicate, authenticate, or scale dynamically.
By default, every Azure VNet is configured with Azure-provided DNS, a fully managed, highly available service that just works — but it’s important to understand how it functions, where it shines, and when you might need something more advanced.
In this blog, we’ll explore how Azure-provided DNS works, where it fits into your network architecture, and how to visualize and test it. We’ll also walk through deploying a VM using Bicep, and include a helpful Mermaid diagram to make the DNS resolution process clear.
What is Azure-provided DNS?
Azure-provided DNS is a free, built-in DNS service automatically enabled for all Azure VNets. It allows resources inside a VNet to resolve:
- Internal Azure names (e.g., VMs in the same VNet or peered VNets)
- Public internet names via recursive lookup
Azure’s DNS service runs at a well-known virtual IP address:
168.63.129.16
All Azure VMs automatically configure this IP as their DNS server unless you override it with custom settings.
How Azure-provided DNS Works
- Dynamic DNS Suffix Assignment: Every VNet gets a default DNS suffix (e.g.,
xyz.internal.cloudapp.net
) automatically. Azure VMs registered to that VNet are reachable by their hostname plus this suffix. - Internal Name Resolution: VMs in the same VNet can resolve each other’s hostnames automatically.
- Recursive Internet Name Resolution: Azure forwards public DNS queries to external authoritative servers for you.
- Automatic Updates: If a VM’s IP changes (e.g., deallocated/reallocated), Azure updates its internal records automatically.
Limitations of Azure-provided DNS
While Azure-provided DNS is simple and effective for many scenarios, it has limitations:
Limitation | Impact |
---|---|
No zone-level control | You cannot create custom DNS zones or records. |
No query logging | DNS query logs are not available. |
No conditional forwarding | You cannot forward specific domains to on-premises DNS servers. |
Static suffix only | You can’t change or customize the VNet DNS suffix. |
No cross-region/global resolution | Name resolution across regions requires peering or Private DNS. |
Visualizing Azure-provided DNS Resolution
Here’s a diagram showing a simple DNS flow for VMs using Azure-provided DNS:
Viewing and Testing Azure-provided DNS in the Portal
Step 1: View DNS Settings in a VNet
- Open the Azure Portal.
- Go to Virtual Networks.
- Select your VNet (e.g.,
myVNet
). - Under Settings, choose DNS Servers.
- Verify that the setting is set to Default (Azure-provided).
Step 2: Deploy a Test VM
- Create a new VM inside the same VNet (
myVNet
). - SSH or RDP into the VM once deployed.
Step 3: Test DNS Resolution
-
Open a terminal or PowerShell session.
-
Run:
1
nslookup <another-vm-name>
-
The DNS server should show as
168.63.129.16
, and you should receive an internal IP address.
You can also test external resolution:
|
|
Deploying a VNet and VM Using Bicep
Here’s a simple Bicep file to create a VNet and VM relying on Azure-provided DNS:
|
|
Pros and Cons of Azure-provided DNS
Pros | Cons |
---|---|
Easy to use, zero configuration needed | No custom records or zones |
Highly available and resilient | No DNS query logging for auditing |
Supports internal and external resolution | No fine-grained control over forwarding behavior |
Free | No multi-region/global VNet name resolution |
Common Scenarios for Azure-provided DNS
- Small to medium workloads: Where internal resolution of VM names is sufficient.
- Development and test environments: Quick setup without worrying about DNS infrastructure.
- Simple hub-and-spoke networks: As long as VNet peering is configured correctly.
- Starting point for hybrid networks: Before moving to Private DNS and Private Resolver.