Azure DNS
Azure DNS
DNS Documentation
Overview
What is Azure DNS?
What is Azure Private DNS?
Quickstarts
Public DNS
Create a public zone - portal
Create a public zone - PowerShell
Create a public zone - CLI
Private DNS
Create a private zone - portal
Create a private zone - CLI
Create a private zone - PowerShell
Tutorials
Public DNS
Host your domain in Azure DNS
Create custom DNS records for a web app
Alias records for Traffic Manager
Alias records for Public IP addresses
Alias records for zone records
Concepts
Public DNS
Zones and records
Alias records
Delegation with Azure DNS
FAQ
DNS metrics and alerts
Reverse DNS
Disaster recovery using Azure DNS and Traffic Manager
Private DNS
Private DNS zone
Virtual network links
Autoregistration
Private DNS scenarios
DNS resolution in virtual networks
FAQ
How to
Public DNS
Alias records for load balanced web apps
Manage DNS zones
Azure portal
Azure PowerShell
Azure CLI
Manage DNS records
Azure portal
Azure PowerShell
Azure CLI
Manage reverse DNS
Host reverse lookup zones in Azure DNS
Manage reverse DNS records for Azure services
Import and export a DNS zone file
Delegate a subdomain
Delegate a subdomain using PowerShell
Integrate with other Azure services
Protect DNS zones and records
Automate DNS operations with the .NET SDK
Custom domains for Azure resources
Troubleshoot
Troubleshooting guide
Reference
Public DNS
Code samples
CLI Samples
Azure PowerShell
Azure CLI
.NET
Java
Node.js
Ruby
Python
REST
Resource Manager template
Private DNS
Azure CLI
Azure PowerShell
.NET
REST
Related
Private Link
Application Gateway
Virtual Network
Virtual Machine
Load Balancer
Traffic Manager
Web apps
Resources
Azure Roadmap
Feature requests
MSDN forum
Networking blog
Pricing
Pricing calculator
Service updates
Private DNS zone migration guide
What is Azure DNS?
11/20/2019 • 2 minutes to read • Edit Online
Azure DNS is a hosting service for DNS domains that provides name resolution by using Microsoft Azure
infrastructure. By hosting your domains in Azure, you can manage your DNS records by using the same
credentials, APIs, tools, and billing as your other Azure services.
You can't use Azure DNS to buy a domain name. For an annual fee, you can buy a domain name by using App
Service domains or a third-party domain name registrar. Your domains then can be hosted in Azure DNS for
record management. For more information, see Delegate a domain to Azure DNS.
The following features are included with Azure DNS.
Security
Azure DNS is based on Azure Resource Manager, which provides features such as:
Role-based access control to control who has access to specific actions for your organization.
Activity logs to monitor how a user in your organization modified a resource or to find an error when
troubleshooting.
Resource locking to lock a subscription, resource group, or resource. Locking prevents other users in your
organization from accidentally deleting or modifying critical resources.
For more information, see How to protect DNS zones and records.
DNSSEC
Azure DNS does not currently support DNSSEC. In most cases, you can reduce the need for DNSSEC by
consistently using HTTPS/TLS in your applications. If DNSSEC is a critical requirement for your DNS zones, you
can host these zones with third party DNS hosting providers.
Ease of use
Azure DNS can manage DNS records for your Azure services and provide DNS for your external resources as
well. Azure DNS is integrated in the Azure portal and uses the same credentials, support contract, and billing as
your other Azure services.
DNS billing is based on the number of DNS zones hosted in Azure and on the number of DNS queries received.
To learn more about pricing, see Azure DNS pricing.
Your domains and records can be managed by using the Azure portal, Azure PowerShell cmdlets, and the cross-
platform Azure CLI. Applications that require automated DNS management can integrate with the service by
using the REST API and SDKs.
Customizable virtual networks with private domains
Azure DNS also supports private DNS domains. This feature allows you to use your own custom domain names
in your private virtual networks rather than the Azure-provided names available today.
For more information, see Use Azure DNS for private domains.
Alias records
Azure DNS supports alias record sets. You can use an alias record set to refer to an Azure resource, such as an
Azure public IP address, an Azure Traffic Manager profile, or an Azure Content Delivery Network (CDN ) endpoint.
If the IP address of the underlying resource changes, the alias record set seamlessly updates itself during DNS
resolution. The alias record set points to the service instance, and the service instance is associated with an IP
address.
Also, you can now point your apex or naked domain to a Traffic Manager profile or CDN endpoint using an alias
record. An example is contoso.com.
For more information, see Overview of Azure DNS alias records.
Next steps
To learn about DNS zones and records, see DNS zones and records overview.
To learn how to create a zone in Azure DNS, see Create a DNS zone.
For frequently asked questions about Azure DNS, see the Azure DNS FAQ.
What is Azure Private DNS?
11/20/2019 • 4 minutes to read • Edit Online
The Domain Name System, or DNS, is responsible for translating (or resolving) a service name to its IP address.
Azure DNS is a hosting service for DNS domains, providing name resolution using the Microsoft Azure
infrastructure. In addition to supporting internet-facing DNS domains, Azure DNS also supports private DNS
zones.
Azure Private DNS provides a reliable, secure DNS service to manage and resolve domain names in a virtual
network without the need to add a custom DNS solution. By using private DNS zones, you can use your own
custom domain names rather than the Azure-provided names available today. Using custom domain names helps
you to tailor your virtual network architecture to best suit your organization's needs. It provides name resolution
for virtual machines (VMs) within a virtual network and between virtual networks. Additionally, you can configure
zones names with a split-horizon view, which allows a private and a public DNS zone to share the name.
To resolve the records of a private DNS zone from your virtual network, you must link the virtual network with
the zone. Linked virtual networks have full access and can resolve all DNS records published in the private zone.
Additionally, you can also enable autoregistration on a virtual network link. If you enable autoregistration on a
virtual network link, the DNS records for the virtual machines on that virtual network are registered in the private
zone. When autoregistration is enabled, Azure DNS also updates the zone records whenever a virtual machine is
created, changes its' IP address, or is deleted.
NOTE
As a best practice, do not use a .local domain for your private DNS zone. Not all operating systems support this.
Benefits
Azure Private DNS provides the following benefits:
Removes the need for custom DNS solutions. Previously, many customers created custom DNS
solutions to manage DNS zones in their virtual network. You can now manage DNS zones using the native
Azure infrastructure, which removes the burden of creating and managing custom DNS solutions.
Use all common DNS records types. Azure DNS supports A, AAAA, CNAME, MX, PTR, SOA, SRV, and
TXT records.
Automatic hostname record management. Along with hosting your custom DNS records, Azure
automatically maintains hostname records for the VMs in the specified virtual networks. In this scenario,
you can optimize the domain names you use without needing to create custom DNS solutions or modify
applications.
Hostname resolution between virtual networks. Unlike Azure-provided host names, private DNS
zones can be shared between virtual networks. This capability simplifies cross-network and service-
discovery scenarios, such as virtual network peering.
Familiar tools and user experience. To reduce the learning curve, this service uses well-established
Azure DNS tools (Azure portal, Azure PowerShell, Azure CLI, Azure Resource Manager templates, and the
REST API).
Split-horizon DNS support. With Azure DNS, you can create zones with the same name that resolve to
different answers from within a virtual network and from the public internet. A typical scenario for split-
horizon DNS is to provide a dedicated version of a service for use inside your virtual network.
Available in all Azure regions. The Azure DNS private zones feature is available in all Azure regions in
the Azure public cloud.
Capabilities
Azure DNS provides the following capabilities:
Automatic registration of virtual machines from a virtual network that's linked to a private zone
with autoregistration enabled. The virtual machines are registered (added) to the private zone as A
records pointing to their private IP addresses. When a virtual machine in a virtual network link with
autoregistration enabled is deleted, Azure DNS also automatically removes the corresponding DNS record
from the linked private zone.
Forward DNS resolution is supported across virtual networks that are linked to the private zone.
For cross-virtual network DNS resolution, there's no explicit dependency such that the virtual networks are
peered with each other. However, you might want to peer virtual networks for other scenarios (for example,
HTTP traffic).
Reverse DNS lookup is supported within the virtual-network scope. Reverse DNS lookup for a
private IP within the virtual network assigned to a private zone returns the FQDN that includes the
host/record name and the zone name as the suffix.
Other considerations
Azure DNS has the following limitations:
A specific virtual network can be linked to only one private zone if automatic registration of VM DNS records
is enabled. You can however link multiple virtual networks to a single DNS zone.
Reverse DNS works only for private IP space in the linked virtual network
Reverse DNS for a private IP address for a linked virtual network returns internal.cloudapp.net as the default
suffix for the virtual machine. For virtual networks that are linked to a private zone with autoregistration
enabled, reverse DNS for a private IP address returns two FQDNs: one with default the suffix
internal.cloudapp.net and another with the private zone suffix.
Conditional forwarding is not currently natively supported. To enable resolution between Azure and on-
premises networks. See Name resolution for VMs and role instances
Pricing
For pricing information, see Azure DNS Pricing.
Next steps
Learn how to create a private zone in Azure DNS by using Azure PowerShell or Azure CLI.
Read about some common private zone scenarios that can be realized with private zones in Azure DNS.
For common questions and answers about private zones in Azure DNS, including specific behavior you can
expect for certain kinds of operations, see Private DNS FAQ.
Learn about DNS zones and records by visiting DNS zones and records overview.
Learn about some of the other key networking capabilities of Azure.
Quickstart: Create an Azure DNS zone and record
using the Azure portal
11/14/2019 • 3 minutes to read • Edit Online
You can configure Azure DNS to resolve host names in your public domain. For example, if you purchased the
contoso.xyz domain name from a domain name registrar, you can configure Azure DNS to host the contoso.xyz
domain and resolve www.contoso.xyz to the IP address of your web server or web app.
In this quickstart, you will create a test domain, and then create an address record to resolve www to the IP
address 10.10.10.10.
IMPORTANT
All the names and IP addresses in this quickstart are examples that do not represent real-world scenarios.
If you don't have an Azure subscription, create a free account before you begin.
For all portal steps, sign in to the Azure portal.
For example:
The host name www.contoso.xyz resolves to 10.10.10.10, just as you configured it. This result verifies that name
resolution is working correctly.
Clean up resources
When you no longer need the resources you created in this quickstart, remove them by deleting the
MyResourceGroup resource group. Open the MyResourceGroup resource group, and select Delete resource
group.
Next steps
Create DNS records for a web app in a custom domain
Quickstart: Create an Azure DNS zone and record
using Azure PowerShell
11/13/2019 • 3 minutes to read • Edit Online
NOTE
This article has been updated to use the new Azure PowerShell Az module. You can still use the AzureRM module, which will
continue to receive bug fixes until at least December 2020. To learn more about the new Az module and AzureRM
compatibility, see Introducing the new Azure PowerShell Az module. For Az module installation instructions, see Install Azure
PowerShell.
In this quickstart, you create your first DNS zone and record using Azure PowerShell. You can also perform these
steps using the Azure portal or the Azure CLI.
A DNS zone is used to host the DNS records for a particular domain. To start hosting your domain in Azure DNS,
you need to create a DNS zone for that domain name. Each DNS record for your domain is then created inside this
DNS zone. Finally, to publish your DNS zone to the Internet, you need to configure the name servers for the
domain. Each of these steps is described below.
Azure DNS also supports creating private domains. For step-by-step instructions about how create your first
private DNS zone and record, see Get started with Azure DNS private zones using PowerShell.
OPTION EXAMPLE/LINK
New-AzDnsRecordSet -Name www -RecordType A -ZoneName contoso.xyz -ResourceGroupName MyResourceGroup -Ttl 3600 -
DnsRecords (New-AzDnsRecordConfig -IPv4Address "10.10.10.10")
View records
To list the DNS records in your zone, use:
2. Copy one of the name server names from the output of the previous step.
3. Open a command prompt, and run the following command:
The host name www.contoso.xyz resolves to 10.10.10.10, just as you configured it. This result verifies that name
resolution is working correctly.
Next steps
Now that you've created your first DNS zone and record using Azure PowerShell, you can create records for a web
app in a custom domain.
Create DNS records for a web app in a custom domain
Quickstart: Create an Azure DNS zone and record
using Azure CLI
11/13/2019 • 3 minutes to read • Edit Online
This article walks you through the steps to create your first DNS zone and record using Azure CLI, which is
available for Windows, Mac and Linux. You can also perform these steps using the Azure portal or Azure
PowerShell.
A DNS zone is used to host the DNS records for a particular domain. To start hosting your domain in Azure DNS,
you need to create a DNS zone for that domain name. Each DNS record for your domain is then created inside this
DNS zone. Finally, to publish your DNS zone to the Internet, you need to configure the name servers for the
domain. Each of these steps is described below.
Azure DNS also supports private DNS zones. To learn more about private DNS zones, see Using Azure DNS for
private domains. For an example on how to create a private DNS zone, see Get started with Azure DNS private
zones using CLI.
OPTION EXAMPLE/LINK
The following example creates a DNS zone called contoso.xyz in the resource group MyResourceGroup. Use the
example to create a DNS zone, substituting the values for your own.
View records
To list the DNS records in your zone, run:
2. Copy one of the name server names from the output of the previous step.
3. Open a command prompt, and run the following command:
For example:
nslookup www.contoso.xyz ns1-08.azure-dns.com.
The host name www.contoso.xyz resolves to 10.10.10.10, just as you configured it. This result verifies that name
resolution is working correctly.
Next steps
Now that you've created your first DNS zone and record using Azure CLI, you can create records for a web app in
a custom domain.
Create DNS records for a web app in a custom domain
Quickstart: Create an Azure private DNS zone using
the Azure portal
11/20/2019 • 4 minutes to read • Edit Online
This quickstart walks you through the steps to create your first private DNS zone and record using the Azure
portal.
A DNS zone is used to host the DNS records for a particular domain. To start hosting your domain in Azure DNS,
you need to create a DNS zone for that domain name. Each DNS record for your domain is then created inside this
DNS zone. To publish a private DNS zone to your virtual network, you specify the list of virtual networks that are
allowed to resolve records within the zone. These are called linked virtual networks. When autoregistration is
enabled, Azure DNS also updates the zone records whenever a virtual machine is created, changes its' IP address,
or is deleted.
In this quickstart, you learn how to:
Create a private DNS zone
Create a virtual network
Link the virtual network
Create test virtual machines
Create an additional DNS record
Test the private zone
If you don’t have an Azure subscription, create a free account before you begin.
If you prefer, you can complete this quickstart using Azure PowerShell or Azure CLI.
ping myVM01.private.contoso.com
ping db.private.contoso.com
Next steps
Azure DNS Private Zones scenarios
Quickstart: Create an Azure private DNS zone using
the Azure CLI
11/20/2019 • 5 minutes to read • Edit Online
This quickstart walks you through the steps to create your first private DNS zone and record using the Azure CLI.
A DNS zone is used to host the DNS records for a particular domain. To start hosting your domain in Azure
DNS, you need to create a DNS zone for that domain name. Each DNS record for your domain is then created
inside this DNS zone. To publish a private DNS zone to your virtual network, you specify the list of virtual
networks that are allowed to resolve records within the zone. These are called linked virtual networks. When
autoregistration is enabled, Azure DNS also updates the zone records whenever a virtual machine is created,
changes its' IP address, or is deleted.
In this quickstart, you learn how to:
Create a private DNS zone
Create test virtual machines
Create an additional DNS record
Test the private zone
If you don’t have an Azure subscription, create a free account before you begin.
If you prefer, you can complete this quickstart using Azure PowerShell.
OPTION EXAMPLE/LINK
If you want to create a zone just for name resolution (no automatic hostname registration), you could use the
-e false parameter.
az vm create \
-n myVM02 \
--admin-username AzureAdmin \
-g MyAzureResourceGroup \
-l eastus \
--subnet backendSubnet \
--vnet-name myAzureVnet \
--nsg NSG01 \
--nsg-rule RDP \
--image win2016datacenter
ping myVM01.private.contoso.com
ping db.private.contoso.com
Next steps
Azure DNS Private Zones scenarios
Quickstart: Create an Azure private DNS zone using
Azure PowerShell
11/20/2019 • 5 minutes to read • Edit Online
This article walks you through the steps to create your first private DNS zone and record using Azure
PowerShell.
NOTE
This article has been updated to use the new Azure PowerShell Az module. You can still use the AzureRM module, which
will continue to receive bug fixes until at least December 2020. To learn more about the new Az module and AzureRM
compatibility, see Introducing the new Azure PowerShell Az module. For Az module installation instructions, see Install
Azure PowerShell.
A DNS zone is used to host the DNS records for a particular domain. To start hosting your domain in Azure
DNS, you need to create a DNS zone for that domain name. Each DNS record for your domain is then created
inside this DNS zone. To publish a private DNS zone to your virtual network, you specify the list of virtual
networks that are allowed to resolve records within the zone. These are called linked virtual networks. When
autoregistration is enabled, Azure DNS also updates the zone records whenever a virtual machine is created,
changes its' IP address, or is deleted.
In this article, you learn how to:
Create a private DNS zone
Create test virtual machines
Create an additional DNS record
Test the private zone
OPTION EXAMPLE/LINK
If you want to create a zone just for name resolution (no automatic hostname registration), you can omit the
-EnableRegistration parameter.
By omitting both the zone name and the resource group name from Get-AzPrivateDnsZone , you can enumerate
all zones in the Azure subscription.
$zones = Get-AzPrivateDnsZone
$zones
New-AzVm `
-ResourceGroupName "myAzureResourceGroup" `
-Name "myVM01" `
-Location "East US" `
-subnetname backendSubnet `
-VirtualNetworkName "myAzureVnet" `
-addressprefix 10.2.0.0/24 `
-OpenPorts 3389
New-AzVm `
-ResourceGroupName "myAzureResourceGroup" `
-Name "myVM02" `
-Location "East US" `
-subnetname backendSubnet `
-VirtualNetworkName "myAzureVnet" `
-addressprefix 10.2.0.0/24 `
-OpenPorts 3389
ping myVM01.private.contoso.com
ping db.private.contoso.com
Next steps
Azure DNS Private Zones scenarios
Tutorial: Host your domain in Azure DNS
11/19/2019 • 4 minutes to read • Edit Online
You can use Azure DNS to host your DNS domain and manage your DNS records. By hosting your domains in
Azure, you can manage your DNS records by using the same credentials, APIs, tools, and billing as your other
Azure services.
Suppose you buy the domain contoso.net from a domain name registrar and then create a zone with the name
contoso.net in Azure DNS. Because you're the owner of the domain, your registrar offers you the option to
configure the name server (NS ) records for your domain. The registrar stores the NS records in the .net parent
zone. Internet users around the world are then directed to your domain in your Azure DNS zone when they try to
resolve DNS records in contoso.net.
In this tutorial, you learn how to:
Create a DNS zone.
Retrieve a list of name servers.
Delegate the domain.
Verify the delegation is working.
If you don’t have an Azure subscription, create a free account before you begin.
Prerequisites
You must have a domain name available to test with that you can host in Azure DNS . You must have full control
of this domain. Full control includes the ability to set the name server (NS ) records for the domain.
The example domain used for this tutorial is contoso.net, but use your own domain name.
Name [your domain name] The domain name you bought. This
tutorial uses contoso.net as an
example.
Location East US
Azure DNS automatically creates authoritative NS records in your zone for the assigned name servers.
Delegate the domain
Now that the DNS zone is created and you have the name servers, you need to update the parent domain with
the Azure DNS name servers. Each registrar has its own DNS management tools to change the name server
records for a domain.
1. In the registrar's DNS management page, edit the NS records and replace the NS records with the Azure
DNS name servers.
2. When you delegate a domain to Azure DNS, you must use the name servers that Azure DNS provides.
Use all four name servers, regardless of the name of your domain. Domain delegation doesn't require a
name server to use the same top-level domain as your domain.
NOTE
When you copy each name server address, make sure you copy the trailing period at the end of the address. The trailing
period indicates the end of a fully qualified domain name. Some registrars append the period if the NS name doesn't have it
at the end. To be compliant with the DNS RFC, include the trailing period.
Delegations that use name servers in your own zone, sometimes called vanity name servers, aren't currently
supported in Azure DNS.
2. Verify that your response looks similar to the following nslookup output:
Server: ns1-04.azure-dns.com
Address: 208.76.47.4
contoso.net
primary name server = ns1-04.azure-dns.com
responsible mail addr = msnhst.microsoft.com
serial = 1
refresh = 900 (15 mins)
retry = 300 (5 mins)
expire = 604800 (7 days)
default TTL = 300 (5 mins)
Clean up resources
You can keep the contosoRG resource group if you intend to do the next tutorial. Otherwise, delete the
contosoRG resource group to delete the resources created in this tutorial.
Select the contosoRG resource group, and then select Delete resource group.
Next steps
In this tutorial, you created a DNS zone for your domain and delegated it to Azure DNS. To learn about Azure
DNS and web apps, continue with the tutorial for web apps.
Create DNS records for a web app in a custom domain
Tutorial: Create DNS records in a custom domain for
a web app
11/20/2019 • 5 minutes to read • Edit Online
You can configure Azure DNS to host a custom domain for your web apps. For example, you can create an Azure
web app and have your users access it using either www.contoso.com or contoso.com as a fully qualified domain
name (FQDN ).
NOTE
Contoso.com is used as an example throughout this tutorial. Substitute your own domain name for contoso.com.
OPTION EXAMPLE/LINK
Prerequisites
NOTE
This article has been updated to use the new Azure PowerShell Az module. You can still use the AzureRM module, which will
continue to receive bug fixes until at least December 2020. To learn more about the new Az module and AzureRM
compatibility, see Introducing the new Azure PowerShell Az module. For Az module installation instructions, see Install Azure
PowerShell.
You must have a domain name available to test with that you can host in Azure DNS . You must have full
control of this domain. Full control includes the ability to set the name server (NS ) records for the domain.
Create an App Service app, or use an app that you created for another tutorial.
Create a DNS zone in Azure DNS, and delegate the zone in your registrar to Azure DNS.
1. To create a DNS zone, follow the steps in Create a DNS zone.
2. To delegate your zone to Azure DNS, follow the steps in DNS domain delegation.
After creating a zone and delegating it to Azure DNS, you can then create records for your custom domain.
NOTE
If you want to verify the domain name, but not route production traffic to the web app, you only need to specify the TXT
record for the verification step. Verification does not require an A or CNAME record in addition to the TXT record.
PS C:\> nslookup
Default Server: Default
Address: 192.168.0.1
> www.contoso.com
Server: default server
Address: 192.168.0.1
Non-authoritative answer:
Name: <instance of web app service>.cloudapp.net
Address: <ip of web app service>
Aliases: www.contoso.com
contoso.azurewebsites.net
<instance of web app service>.vip.azurewebsites.windows.net
> contoso.com
Server: default server
Address: 192.168.0.1
Non-authoritative answer:
Name: contoso.com
Address: <ip of web app service>
Non-authoritative answer:
contoso.com text =
"contoso.azurewebsites.net"
set-AzWebApp `
-Name contoso `
-ResourceGroupName MyAzureResourceGroup `
-HostNames @("contoso.com","www.contoso.com","contoso.azurewebsites.net")
NOTE
Make sure you include the http:// prefix, otherwise your browser may attempt to predict a URL for you!
You should see the same page for both URLs. For example:
Clean up resources
When you no longer need the resources created in this tutorial, you can delete the myresourcegroup resource
group.
Next steps
Learn how to create Azure DNS private zones.
Get started with Azure DNS private zones using PowerShell
Tutorial: Configure an alias record to support apex
domain names with Traffic Manager
11/14/2019 • 4 minutes to read • Edit Online
You can create an alias record for your domain name apex to reference an Azure Traffic Manager profile. An
example is contoso.com. Instead of using a redirecting service, you configure Azure DNS to reference a Traffic
Manager profile directly from your zone.
In this tutorial, you learn how to:
Create a host VM and network infrastructure.
Create a Traffic Manager profile.
Create an alias record.
Test the alias record.
If you don’t have an Azure subscription, create a free account before you begin.
Prerequisites
You must have a domain name available that you can host in Azure DNS to test with. You must have full control of
this domain. Full control includes the ability to set the name server (NS ) records for the domain.
For instructions on how to host your domain in Azure DNS, see Tutorial: Host your domain in Azure DNS.
The example domain used for this tutorial is contoso.com, but use your own domain name.
Clean up resources
When you no longer need the resources created for this tutorial, delete the RG-DNS -Alias-TM resource group.
Next steps
In this tutorial, you created an alias record to use your apex domain name to reference a Traffic Manager profile. To
learn about Azure DNS and web apps, continue with the tutorial for web apps.
Host load-balanced web apps at the zone apex
Tutorial: Configure an alias record to refer to an
Azure public IP address
11/13/2019 • 2 minutes to read • Edit Online
Prerequisites
You must have a domain name available that you can host in Azure DNS to test with. You must have full control of
this domain. Full control includes the ability to set the name server (NS ) records for the domain.
For instructions to host your domain in Azure DNS, see Tutorial: Host your domain in Azure DNS.
The example domain used for this tutorial is contoso.com, but use your own domain name.
Clean up resources
When you no longer need the resources created for this tutorial, delete the RG-DNS -Alias-pip resource group.
Next steps
In this tutorial, you created an alias record to refer to an Azure public IP address. To learn about Azure DNS and
web apps, continue with the tutorial for web apps.
Create DNS records for a web app in a custom domain
Tutorial: Create an alias record to refer to a zone
resource record
11/14/2019 • 2 minutes to read • Edit Online
Alias records can reference other record sets of the same type. For example, you can have a DNS CNAME record
set be an alias to another CNAME record set of the same type. This capability is useful if you want to have some
record sets as aliases and some as non-aliases in terms of behavior.
In this tutorial, you learn how to:
Create an alias record for a resource record in the zone.
Test the alias record.
If you don’t have an Azure subscription, create a free account before you begin.
Prerequisites
You must have a domain name available that you can host in Azure DNS to test with. You must have full control of
this domain. Full control includes the ability to set the name server (NS ) records for the domain.
For instructions to host your domain in Azure DNS, see Tutorial: Host your domain in Azure DNS.
Next steps
In this tutorial, you created an alias record to refer to a resource record within the zone. To learn about Azure DNS
and web apps, continue with the tutorial for web apps.
Create DNS records for a web app in a custom domain
Overview of DNS zones and records
1/19/2020 • 12 minutes to read • Edit Online
This page explains the key concepts of domains, DNS zones, and DNS records and record sets, and how they are
supported in Azure DNS.
Domain names
The Domain Name System is a hierarchy of domains. The hierarchy starts from the 'root' domain, whose name is
simply '.'. Below this come top-level domains, such as 'com', 'net', 'org', 'uk' or 'jp'. Below these are second-level
domains, such as 'org.uk' or 'co.jp'. The domains in the DNS hierarchy are globally distributed, hosted by DNS
name servers around the world.
A domain name registrar is an organization that allows you to purchase a domain name, such as contoso.com .
Purchasing a domain name gives you the right to control the DNS hierarchy under that name, for example
allowing you to direct the name www.contoso.com to your company web site. The registrar may host the domain
in its own name servers on your behalf, or allow you to specify alternative name servers.
Azure DNS provides a globally distributed, high-availability name server infrastructure, which you can use to
host your domain. By hosting your domains in Azure DNS, you can manage your DNS records with the same
credentials, APIs, tools, billing, and support as your other Azure services.
Azure DNS does not currently support purchasing of domain names. If you want to purchase a domain name,
you need to use a third-party domain name registrar. The registrar typically charges a small annual fee. The
domains can then be hosted in Azure DNS for management of DNS records. See Delegate a Domain to Azure
DNS for details.
DNS zones
A DNS zone is used to host the DNS records for a particular domain. To start hosting your domain in Azure
DNS, you need to create a DNS zone for that domain name. Each DNS record for your domain is then created
inside this DNS zone.
For example, the domain 'contoso.com' may contain several DNS records, such as 'mail.contoso.com' (for a mail
server) and 'www.contoso.com' (for a web site).
When creating a DNS zone in Azure DNS:
The name of the zone must be unique within the resource group, and the zone must not exist already.
Otherwise, the operation fails.
The same zone name can be reused in a different resource group or a different Azure subscription.
Where multiple zones share the same name, each instance is assigned different name server addresses. Only
one set of addresses can be configured with the domain name registrar.
NOTE
You do not have to own a domain name to create a DNS zone with that domain name in Azure DNS. However, you do
need to own the domain to configure the Azure DNS name servers as the correct name servers for the domain name with
the domain name registrar.
For more information, see Delegate a domain to Azure DNS.
DNS records
Record names
In Azure DNS, records are specified by using relative names. A fully qualified domain name (FQDN ) includes the
zone name, whereas a relative name does not. For example, the relative record name www in the zone
contoso.com gives the fully qualified record name www.contoso.com .
An apex record is a DNS record at the root (or apex) of a DNS zone. For example, in the DNS zone contoso.com ,
an apex record also has the fully qualified name contoso.com (this is sometimes called a naked domain). By
convention, the relative name '@' is used to represent apex records.
Record types
Each DNS record has a name and a type. Records are organized into various types according to the data they
contain. The most common type is an 'A' record, which maps a name to an IPv4 address. Another common type
is an 'MX' record, which maps a name to a mail server.
Azure DNS supports all common DNS record types: A, AAAA, CAA, CNAME, MX, NS, PTR, SOA, SRV, and TXT.
Note that SPF records are represented using TXT records.
Record sets
Sometimes you need to create more than one DNS record with a given name and type. For example, suppose the
'www.contoso.com' web site is hosted on two different IP addresses. The website requires two different A
records, one for each IP address. Here is an example of a record set:
Azure DNS manages all DNS records using record sets. A record set (also known as a resource record set) is the
collection of DNS records in a zone that have the same name and are of the same type. Most record sets contain
a single record. However, examples like the one above, in which a record set contains more than one record, are
not uncommon.
For example, suppose you have already created an A record 'www' in the zone 'contoso.com', pointing to the IP
address '134.170.185.46' (the first record above). To create the second record you would add that record to the
existing record set, rather than create an additional record set.
The SOA and CNAME record types are exceptions. The DNS standards don't permit multiple records with the
same name for these types, therefore these record sets can only contain a single record.
Time -to -live
The time to live, or TTL, specifies how long each record is cached by clients before being requeried. In the above
example, the TTL is 3600 seconds or 1 hour.
In Azure DNS, the TTL is specified for the record set, not for each record, so the same value is used for all records
within that record set. You can specify any TTL value between 1 and 2,147,483,647 seconds.
Wildcard records
Azure DNS supports wildcard records. Wildcard records are returned in response to any query with a matching
name (unless there is a closer match from a non-wildcard record set). Azure DNS supports wildcard record sets
for all record types except NS and SOA.
To create a wildcard record set, use the record set name '*'. Alternatively, you can also use a name with '*' as its
left-most label, for example, '*.foo'.
CAA records
CAA records allow domain owners to specify which Certificate Authorities (CAs) are authorized to issue
certificates for their domain. This allows CAs to avoid mis-issuing certificates in some circumstances. CAA
records have three properties:
Flags: This is an integer between 0 and 255, used to represent the critical flag that has special meaning per the
RFC
Tag: an ASCII string that can be one of the following:
issue: use this if you want to specify CAs that are permitted to issue certs (all types)
issuewild: use this if you want to specify CAs that are permitted to issue certs (wildcard certs only)
iodef: specify an email address or hostname to which CAs can notify for unauthorized cert issue
requests
Value: the value for the specific Tag chosen
CNAME records
CNAME record sets cannot coexist with other record sets with the same name. For example, you cannot create a
CNAME record set with the relative name 'www' and an A record with the relative name 'www' at the same time.
Because the zone apex (name = '@') always contains the NS and SOA record sets that were created when the
zone was created, you can't create a CNAME record set at the zone apex.
These constraints arise from the DNS standards and are not limitations of Azure DNS.
NS records
The NS record set at the zone apex (name '@') is created automatically with each DNS zone, and is deleted
automatically when the zone is deleted (it cannot be deleted separately).
This record set contains the names of the Azure DNS name servers assigned to the zone. You can add additional
name servers to this NS record set, to support co-hosting domains with more than one DNS provider. You can
also modify the TTL and metadata for this record set. However, you cannot remove or modify the pre-populated
Azure DNS name servers.
This applies only to the NS record set at the zone apex. Other NS record sets in your zone (as used to delegate
child zones) can be created, modified, and deleted without constraint.
SOA records
A SOA record set is created automatically at the apex of each zone (name = '@'), and is deleted automatically
when the zone is deleted. SOA records cannot be created or deleted separately.
You can modify all properties of the SOA record except for the 'host' property, which is pre-configured to refer to
the primary name server name provided by Azure DNS.
The zone serial number in the SOA record is not updated automatically when changes are made to the records in
the zone. It can be updated manually by editing the SOA record, if necessary.
SPF records
Sender policy framework (SPF ) records are used to specify which email servers can send email on behalf of a
domain name. Correct configuration of SPF records is important to prevent recipients from marking your email
as junk.
The DNS RFCs originally introduced a new SPF record type to support this scenario. To support older name
servers, they also allowed the use of the TXT record type to specify SPF records. This ambiguity led to confusion,
which was resolved by RFC 7208. It states that SPF records must be created by using the TXT record type. It also
states that the SPF record type is deprecated.
SPF records are supported by Azure DNS and must be created by using the TXT record type. The
obsolete SPF record type isn't supported. When you import a DNS zone file, any SPF records that use the SPF
record type are converted to the TXT record type.
SRV records
SRV records are used by various services to specify server locations. When specifying an SRV record in Azure
DNS:
The service and protocol must be specified as part of the record set name, prefixed with underscores. For
example, '_sip._tcp.name'. For a record at the zone apex, there is no need to specify '@' in the record name,
simply use the service and protocol, for example '_sip._tcp'.
The priority, weight, port, and target are specified as parameters of each record in the record set.
TXT records
TXT records are used to map domain names to arbitrary text strings. They are used in multiple applications, in
particular related to email configuration, such as the Sender Policy Framework (SPF ) and DomainKeys Identified
Mail (DKIM ).
The DNS standards permit a single TXT record to contain multiple strings, each of which may be up to 254
characters in length. Where multiple strings are used, they are concatenated by clients and treated as a single
string.
When calling the Azure DNS REST API, you need to specify each TXT string separately. When using the Azure
portal, PowerShell or CLI interfaces you should specify a single string per record, which is automatically divided
into 254-character segments if necessary.
The multiple strings in a DNS record should not be confused with the multiple TXT records in a TXT record set. A
TXT record set can contain multiple records, each of which can contain multiple strings. Azure DNS supports a
total string length of up to 1024 characters in each TXT record set (across all records combined).
As an alternative to record set tags, Azure DNS supports annotating record sets using 'metadata'. Similar to tags,
metadata enables you to associate name-value pairs with each record set. This can be useful, for example to
record the purpose of each record set. Unlike tags, metadata cannot be used to provide a filtered view of your
Azure bill and cannot be specified in an Azure Resource Manager policy.
Etags
Suppose two people or two processes try to modify a DNS record at the same time. Which one wins? And does
the winner know that they've overwritten changes created by someone else?
Azure DNS uses Etags to handle concurrent changes to the same resource safely. Etags are separate from Azure
Resource Manager 'Tags'. Each DNS resource (zone or record set) has an Etag associated with it. Whenever a
resource is retrieved, its Etag is also retrieved. When updating a resource, you can choose to pass back the Etag
so Azure DNS can verify that the Etag on the server matches. Since each update to a resource results in the Etag
being regenerated, an Etag mismatch indicates a concurrent change has occurred. Etags can also be used when
creating a new resource to ensure that the resource does not already exist.
By default, Azure DNS PowerShell uses Etags to block concurrent changes to zones and record sets. The optional
-Overwrite switch can be used to suppress Etag checks, in which case any concurrent changes that have occurred
are overwritten.
At the level of the Azure DNS REST API, Etags are specified using HTTP headers. Their behavior is given in the
following table:
HEADER BEHAVIOR
If-match <etag> PUT only succeeds if resource exists and Etag matches
Limits
The following default limits apply when using Azure DNS:
Public DNS zones
Virtual Networks Links per private DNS zones with auto- 100
registration enabled
Azure DNS alias records are qualifications on a DNS record set. They can reference other Azure resources from
within your DNS zone. For example, you can create an alias record set that references an Azure public IP address
instead of an A record. Your alias record set points to an Azure public IP address service instance dynamically. As a
result, the alias record set seamlessly updates itself during DNS resolution.
An alias record set is supported for the following record types in an Azure DNS zone:
A
AAAA
CNAME
NOTE
If you intend to use an alias record for the A or AAAA record types to point to an Azure Traffic Manager profile you must
make sure that the Traffic Manager profile has only external endpoints. You must provide the IPv4 or IPv6 address for
external endpoints in Traffic Manager. You can't use fully-qualified domain names (FQDNs) in endpoints. Ideally, use static IP
addresses.
Capabilities
Point to a public IP resource from a DNS A/AAAA record set. You can create an A/AAAA record set
and make it an alias record set to point to a public IP resource (standard or basic). The DNS record set
changes automatically if the public IP address changes or is deleted. Dangling DNS records that point to
incorrect IP addresses are avoided.
There is a current limit of 20 alias records sets per resource.
Point to a Traffic Manager profile from a DNS A/AAAA/CNAME record set. You can create an
A/AAAA or CNAME record set and use alias records to point it to a Traffic Manager profile. It's especially
useful when you need to route traffic at a zone apex, as traditional CNAME records aren't supported for a
zone apex. For example, say your Traffic Manager profile is myprofile.trafficmanager.net and your business
DNS zone is contoso.com. You can create an alias record set of type A/AAAA for contoso.com (the zone
apex) and point to myprofile.trafficmanager.net.
Point to an Azure Content Delivery Network (CDN ) endpoint. This is useful when you create static
websites using Azure storage and Azure CDN.
Point to another DNS record set within the same zone. Alias records can reference other record sets of
the same type. For example, a DNS CNAME record set can be an alias to another CNAME record set. This
arrangement is useful if you want some record sets to be aliases and some non-aliases.
Scenarios
There are a few common scenarios for Alias records.
Prevent dangling DNS records
A common problem with traditional DNS records is dangling records. For example, DNS records that haven't been
updated to reflect changes to IP addresses. The issue occurs especially with A/AAAA or CNAME record types.
With a traditional DNS zone record, if the target IP or CNAME no longer exists, the DNS record associated with it
must be manually updated. In some organizations, a manual update might not happen in time because of process
issues or the separation of roles and associated permission levels. For example, a role might have the authority to
delete a CNAME or IP address that belongs to an application. But it doesn't have sufficient authority to update the
DNS record that points to those targets. A delay in updating the DNS record can potentially cause an outage for
the users.
Alias records prevent dangling references by tightly coupling the life cycle of a DNS record with an Azure resource.
For example, consider a DNS record that's qualified as an alias record to point to a public IP address or a Traffic
Manager profile. If you delete those underlying resources, the DNS alias record becomes an empty record set. It
no longer references the deleted resource.
Update DNS record-set automatically when application IP addresses change
This scenario is similar to the previous one. Perhaps an application is moved, or the underlying virtual machine is
restarted. An alias record then updates automatically when the IP address changes for the underlying public IP
resource. This avoids potential security risks of directing the users to another application that has been assigned
the old public IP address.
Host load-balanced applications at the zone apex
The DNS protocol prevents the assignment of CNAME records at the zone apex. For example if your domain is
contoso.com; you can create CNAME records for somelabel.contoso.com; but you can't create CNAME for
contoso.com itself. This restriction presents a problem for application owners who have load-balanced applications
behind Azure Traffic Manager. Since using a Traffic Manager profile requires creation of a CNAME record, it isn't
possible to point at the Traffic Manager profile from the zone apex.
This problem is solved using alias records. Unlike CNAME records, alias records are created at the zone apex and
application owners can use it to point their zone apex record to a Traffic Manager profile that has external
endpoints. Application owners point to the same Traffic Manager profile that's used for any other domain within
their DNS zone.
For example, contoso.com and www.contoso.com can point to the same Traffic Manager profile. To learn more
about using alias records with Azure Traffic Manager profiles, see the Next steps section.
Point zone apex to Azure CDN endpoints
Just like a Traffic Manager profile, you can also use alias records to point your DNS zone apex to Azure CDN
endpoints. This is useful when you create static websites using Azure storage and Azure CDN. You can then access
the website without prepending "www" to your DNS name.
For example, if your static website is named www.contoso.com, your users can access your site using contoso.com
without the need to prepend www to the DNS name.
As described previously, CNAME records aren't supported at the zone apex. So, you can’t use a CNAME record to
point contoso.com to your CDN endpoint. Instead, you can use an alias record to point the zone apex to a CDN
endpoint directly.
NOTE
Pointing a zone apex to CDN endpoints for Azure CDN from Akamai is currently not supported.
Next steps
To learn more about alias records, see the following articles:
Tutorial: Configure an alias record to refer to an Azure public IP address
Tutorial: Configure an alias record to support apex domain names with Traffic Manager
DNS FAQ
Delegation of DNS zones with Azure DNS
11/20/2019 • 4 minutes to read • Edit Online
Azure DNS allows you to host a DNS zone and manage the DNS records for a domain in Azure. In order for
DNS queries for a domain to reach Azure DNS, the domain has to be delegated to Azure DNS from the parent
domain. Keep in mind Azure DNS is not the domain registrar. This article explains how domain delegation works
and how to delegate domains to Azure DNS.
Next steps
Learn how to delegate your domain to Azure DNS
Azure DNS FAQ
1/14/2020 • 11 minutes to read • Edit Online
Alias records
What are some scenarios where alias records are useful?
See the scenarios section in the Azure DNS alias records overview.
What record types are supported for alias record sets?
Alias record sets are supported for the following record types in an Azure DNS zone:
A
AAAA
CNAME
What resources are supported as targets for alias record sets?
Point to a public IP resource from a DNS A/AAAA record set. You can create an A/AAAA record set and
make it an alias record set to point to a public IP resource.
Point to a Traffic Manager profile from a DNS A/AAAA/CNAME record set. You can point to the
CNAME of a Traffic Manager profile from a DNS CNAME record set. An example is contoso.trafficmanager.net.
Now, you also can point to a Traffic Manager profile that has external endpoints from an A or AAAA record set
in your DNS zone.
Point to an Azure Content Delivery Network (CDN ) endpoint. This is useful when you create static
websites using Azure storage and Azure CDN.
Point to another DNS record set within the same zone. Alias records can reference to other record sets of
the same type. For example, you can have a DNS CNAME record set be an alias to another CNAME record set
of the same type. This arrangement is useful if you want some record sets to be aliases and some non-aliases.
Can I create and update alias records from the Azure portal?
Yes. You can create or manage alias records in the Azure portal along with the Azure REST APIs, PowerShell, the
CLI, and SDKs.
Will alias records help to make sure my DNS record set is deleted when the underlying public IP is deleted?
Yes. This feature is one of the core capabilities of alias records. It helps you avoid potential outages for users of
your application.
Will alias records help to make sure my DNS record set is updated to the correct IP address when the underlying
public IP address changes?
Yes. This feature is one of the core capabilities of alias records. It helps you avoid potential outages or security risks
for your application.
Are there any restrictions when using alias record sets for A or AAAA records to point to Traffic Manager?
Yes. To point to a Traffic Manager profile as an alias from an A or AAAA record set, the Traffic Manager profile must
use only external endpoints. When you create the external endpoints in Traffic Manager, provide the actual IP
addresses of the endpoints.
Is there an additional charge to use alias records?
Alias records are a qualification on a valid DNS record set. There's no additional billing for alias records.
Virtual Networks Links per private DNS zones with auto- 100
registration enabled
Number of private DNS zones a virtual network can get linked 1000
Can I move an Azure DNS zone between resource groups or between subscriptions?
Yes. DNS zones can be moved between resource groups or between subscriptions.
There's no effect on DNS queries when you move a DNS zone. The name servers assigned to the zone stay the
same. DNS queries are processed as normal throughout.
For more information and instructions on how to move DNS zones, see Move resources to a new resource group
or subscription.
How long does it take for DNS changes to take effect?
New DNS zones and DNS records typically appear in the Azure DNS name servers quickly. The timing is a few
seconds.
Changes to existing DNS records can take a little longer. They typically appear in the Azure DNS name servers
within 60 seconds. DNS caching by DNS clients and DNS recursive resolvers outside of Azure DNS also can affect
timing. To control this cache duration, use the Time-To-Live (TTL ) property of each record set.
How can I protect my DNS zones against accidental deletion?
Azure DNS is managed by using Azure Resource Manager. Azure DNS benefits from the access control features
that Azure Resource Manager provides. Role-based access control controls which users have read or write access
to DNS zones and record sets. Resource locks prevent accidental modification or deletion of DNS zones and record
sets.
For more information, see Protect DNS zones and records.
How do I set up SPF records in Azure DNS?
Sender policy framework (SPF ) records are used to specify which email servers can send email on behalf of a
domain name. Correct configuration of SPF records is important to prevent recipients from marking your email as
junk.
The DNS RFCs originally introduced a new SPF record type to support this scenario. To support older name
servers, they also allowed the use of the TXT record type to specify SPF records. This ambiguity led to confusion,
which was resolved by RFC 7208. It states that SPF records must be created by using the TXT record type. It also
states that the SPF record type is deprecated.
SPF records are supported by Azure DNS and must be created by using the TXT record type. The obsolete
SPF record type isn't supported. When you import a DNS zone file, any SPF records that use the SPF record type
are converted to the TXT record type.
Do Azure DNS name servers resolve over IPv6?
Yes. Azure DNS name servers are dual stack. Dual stack means they have IPv4 and IPv6 addresses. To find the
IPv6 address for the Azure DNS name servers assigned to your DNS zone, use a tool such as nslookup. An
example is nslookup -q=aaaa <Azure DNS Nameserver> .
How do I set up an IDN in Azure DNS?
Internationalized domain names (IDNs) encode each DNS name by using punycode. DNS queries are made by
using these punycode-encoded names.
To configure IDNs in Azure DNS, convert the zone name or record set name to punycode. Azure DNS doesn't
currently support built-in conversion to or from punycode.
Next steps
Learn more about Azure DNS.
Learn more about how to use Azure DNS for private domains.
Learn more about DNS zones and records.
Get started with Azure DNS .
Azure DNS metrics and alerts
11/19/2019 • 3 minutes to read • Edit Online
Azure DNS is a hosting service for DNS domains that provides name resolution using the Microsoft Azure
infrastructure. This article describes metrics and alerts for the Azure DNS service.
NOTE
At this time, these metrics are only available for Public DNS zones hosted in Azure DNS. If you have Private Zones hosted in
Azure DNS, these metrics will not provide data for those zones. In addition, the metrics and alerting feature is only supported
in Azure Public cloud. Support for sovereign clouds will follow at a later time.
The most granular element that you can see metrics for is a DNS zone. You cannot currently see metrics for
individual resource records within a zone.
Query volume
The Query Volume metric in Azure DNS shows the volume of DNS queries (query traffic) that is received by Azure
DNS for your DNS zone. The unit of measurement is Count and the aggregation is the total of all the queries
received over a period of time.
To view this metric, select Metrics (preview ) explorer experience from the Monitor tab in the Azure portal. Select
your DNS zone from the Resource drop-down, select the Query Volume metric, and select Sum as the
Aggregation. Below screenshot shows an example. For more information on the Metrics Explorer experience and
charting, see Azure Monitor Metrics Explorer.
Figure: Azure DNS Query Volume metrics
Record Set Count
The Record Set Count metric shows the number of Recordsets in Azure DNS for your DNS zone. All the
Recordsets defined in your zone are counted. The unit of measurement is Count and the aggregation is the
Maximum of all the Recordsets. To view this metric, select Metrics (preview) explorer experience from the
Monitor tab in the Azure portal. Select your DNS zone from the Resource drop-down, select the Record Set
Count metric, and then select Max as the Aggregation. For more information on the Metrics Explorer experience
and charting, see Azure Monitor Metrics Explorer.
Next steps
Learn more about Azure DNS.
Overview of reverse DNS and support in Azure
11/20/2019 • 5 minutes to read • Edit Online
This article gives an overview of how reverse DNS works, and the reverse DNS scenarios supported in Azure.
NOTE
Forward DNS lookups and reverse DNS lookups are implemented in separate, parallel DNS hierarchies. The reverse lookup for
'www.contoso.com' is not hosted in the zone 'contoso.com', rather it is hosted in the ARPA zone for the corresponding IP address
block. Separate zones are used for IPv4 and IPv6 address blocks.
IPv4
The name of an IPv4 reverse lookup zone should be in the following format:
<IPv4 network prefix in reverse order>.in-addr.arpa .
For example, when creating a reverse zone to host records for hosts with IPs that are in the 192.0.2.0/24 prefix, the zone
name would be created by isolating the network prefix of the address (192.0.2) and then reversing the order (2.0.192) and
adding the suffix .in-addr.arpa .
REVERSED NETWORK
SUBNET CLASS NETWORK PREFIX PREFIX STANDARD SUFFIX REVERSE ZONE NAME
$ORIGIN 2.0.192.in-addr.arpa
; Delegate child zone
128-26 NS <name server 1 for 128-26.2.0.192.in-addr.arpa>
128-26 NS <name server 2 for 128-26.2.0.192.in-addr.arpa>
; CNAME records for each IP address
129 CNAME 129.128-26.2.0.192.in-addr.arpa
130 CNAME 130.128-26.2.0.192.in-addr.arpa
131 CNAME 131.128-26.2.0.192.in-addr.arpa
; etc
The organization then manages the individual PTR records within their child zone.
$ORIGIN 128-26.2.0.192.in-addr.arpa
; PTR records for each UIP address. Names match CNAME targets in parent zone
129 PTR www.contoso.com
130 PTR mail.contoso.com
131 PTR partners.contoso.com
; etc
A reverse lookup for the IP address '192.0.2.129' queries for a PTR record named '129.2.0.192.in-addr.arpa'. This query
resolves via the CNAME in the parent zone to the PTR record in the child zone.
IPv6
The name of an IPv6 reverse lookup zone should be in the following form:
<IPv6 network prefix in reverse order>.ip6.arpa
For example,. When creating a reverse zone to host records for hosts with IPs that are in the 2001:db8:1000:abdc::/64
prefix, the zone name would be created by isolating the network prefix of the address (2001:db8:abdc::). Next expand the
IPv6 network prefix to remove zero compression, if it was used to shorten the IPv6 address prefix (2001:0db8:abdc:0000::).
Reverse the order, using a period as the delimiter between each hexadecimal number in the prefix, to build the reversed
network prefix ( 0.0.0.0.c.d.b.a.8.b.d.0.1.0.0.2 ) and add the suffix .ip6.arpa .
Next steps
For more information on reverse DNS, see reverse DNS lookup on Wikipedia.
Learn how to host the reverse lookup zone for your ISP-assigned IP range in Azure DNS.
Learn how to manage reverse DNS records for your Azure services.
Disaster recovery using Azure DNS and Traffic
Manager
11/25/2019 • 10 minutes to read • Edit Online
Disaster recovery focuses on recovering from a severe loss of application functionality. In order to choose a
disaster recovery solution, business and technology owners must first determine the level of functionality that is
required during a disaster, such as - unavailable, partially available via reduced functionality, or delayed availability,
or fully available. Most enterprise customers are choosing a multi-region architecture for resiliency against an
application or infrastructure level failover. Customers can choose several approaches in the quest to achieve
failover and high availability via redundant architecture. Here are some of the popular approaches:
Active-passive with cold standby: In this failover solution, the VMs and other appliances that are running
in the standby region are not active until there is a need for failover. However, the production environment is
replicated in the form of backups, VM images, or Resource Manager templates, to a different region. This
failover mechanism is cost-effective but takes a longer time to undertake a complete failover.
This step can be executed manually or via automation. It can be done manually via the console or by the Azure CLI.
The Azure SDK and API can be used to automate the CNAME update so that no manual intervention is required.
Automation can be built via Azure functions or within a third-party monitoring application or even from on-
premises.
How manual failover works using Azure DNS
Since the DNS server is outside the failover or disaster zone, it is insulated against any downtime. This enables
user to architect a simple failover scenario that is cost effective and will work all the time assuming that the
operator has network connectivity during disaster and can make the flip. If the solution is scripted, then one must
ensure that the server or service running the script should be insulated against the problem affecting the
production environment. Also, keep in mind the low TTL that was set against the zone so that no resolver around
the world keeps the endpoint cached for long and customers can access the site within the RTO. For a cold standby
and pilot light, since some prewarming and other administrative activity may be required – one should also give
enough time before making the flip.
Next steps
Learn more about Azure Traffic Manager.
Learn more about Azure DNS.
What is a private Azure DNS zone
1/3/2020 • 2 minutes to read • Edit Online
Azure Private DNS provides a reliable, secure DNS service to manage and resolve domain names in a virtual
network without the need to add a custom DNS solution. By using private DNS zones, you can use your own
custom domain names rather than the Azure-provided names available today.
The records contained in a private DNS zone are not resolvable from the Internet. DNS resolution against a private
DNS zone works only from virtual networks that are linked to it.
You can link a private DNS zone to one or more virtual networks by creating virtual network links. You can also
enable auto-registration feature to automatically manage the life cycle of the DNS records for the virtual machines
deployed in a virtual network.
Limits
To understand how many private DNS zones you can create in a subscription and how many record sets are
supported in a private DNS zone see Azure DNS limits
Restrictions
Single labeled private DNS zones are not supported. Your private DNS zone must have two or more labels. For
example contoso.com has two labels separated by a dot. A private DNS zone can have a maximum 34 labels.
You can't create zone delegations (NS records) in a private DNS zone. If you intend to use a child domain, you
can directly create the domain as a private DNS zone and link it to virtual network without setting up a
nameserver delegation from the parent zone.
Next steps
Learn how to create a private zone in Azure DNS by using Azure PowerShell or Azure CLI.
Read about some common private zone scenarios that can be realized with private zones in Azure DNS.
For common questions and answers about private zones in Azure DNS, including specific behavior you can
expect for certain kinds of operations, see Private DNS FAQ.
What is a virtual network link?
1/3/2020 • 2 minutes to read • Edit Online
Once you create a private DNS zone in Azure, it is not immediately accessible from any virtual network. You must
link it to a virtual network before a VM hosted in that network can access the private DNS zone. To link a private
DNS zone with a virtual network, you must create a virtual network link under the private DNS zone. Every
private DNS zone has a collection of virtual network link child resources. Each one of these resources represents a
connection to a virtual network.
You can link a virtual network to a private DNS zone as a registration virtual network or as a resolution virtual
network.
Limits
To understand how many registration and resolution networks, you can link to private DNS zones see Azure DNS
Limits
Other considerations
Virtual networks deployed using classic deployment model are not supported.
You can create only one link between a private DNS zone and a virtual network.
Each virtual network link under a private DNS zone must have unique name within the context of the
private DNS zone. You can have links with same name in different private DNS zones.
After creating a virtual network link, check the "Link Status" field of the virtual network link resource.
Depending on the size of the virtual network, it can take a few minutes before the link is operation and the
Link Status changes to Completed.
When you delete a virtual network, all the virtual network links and auto-registered DNS records
associated with it in different private DNS zones are automatically deleted.
Next steps
Learn how to link a virtual network to a private DNS zone using Azure portal
Learn how to create a private zone in Azure DNS by using Azure PowerShell or Azure CLI.
Read about some common private zone scenarios that can be realized with private zones in Azure DNS.
For common questions and answers about private zones in Azure DNS, including specific behavior you can
expect for certain kinds of operations, see Private DNS FAQ.
What is the autoregistration feature of Azure DNS
private zones
10/4/2019 • 2 minutes to read • Edit Online
The Azure DNS private zones auto registration feature takes the pain out of DNS record management for virtual
machines deployed in a virtual network. When you link an virtual network with a private DNS zone and enable
auto registration for all the virtual machines, the DNS records for the virtual machines deployed in the virtual
network are automatically created in the private DNS zone. In addition to forward look records (A records),
reverse lookup records (PTR records) are also automatically created for the virtual machines. If you add more
virtual machines to the virtual network, DNS records for these virtual machines are also automatically created in
the linked private DNS zone.
When you delete a virtual machine, the DNS records for the virtual machine are automatically deleted from the
private DNS zone.
You can enable autoregistration by selecting "Enable auto registration" option while creating a virtual network link.
Restrictions
Autoregistration works only for virtual machines. For all other resources like internal load balancers etc., you
can create DNS records manually in the private DNS zone linked to the virtual network.
DNS records are created automatically only for the primary virtual machine NIC . If your virtual machines have
more than one NIC, you can manually create the DNS records for other network interfaces.
autoregistration for IPv6 (AAAA records) is not supported.
Next steps
Learn how to create a private zone in Azure DNS using Azure PowerShell or Azure CLI.
Read about some common private zone scenarios that can be realized with private zones in Azure DNS.
For common questions and answers about private zones in Azure DNS, including specific behavior you can
expect for certain kinds of operations, see Private DNS FAQ.
Azure DNS Private zones scenarios
11/20/2019 • 3 minutes to read • Edit Online
Azure DNS Private Zones provide name resolution within a virtual network as well as between virtual networks.
In this article, we look at some common scenarios that can be realized using this feature.
Depending on how you use Azure to host IaaS, PaaS, and hybrid solutions, you might need to allow the virtual
machines (VMs), and other resources deployed in a virtual network to communicate with each other. Although you
can enable communication by using IP addresses, it is much simpler to use names that can be easily remembered,
and do not change.
When resources deployed in virtual networks need to resolve domain names to internal IP addresses, they can use
one of two methods:
Azure-provided name resolution
Name resolution that uses your own DNS server (which might forward queries to the Azure-provided DNS
servers)
The type of name resolution you use depends on how your resources need to communicate with each other. The
following table illustrates scenarios and corresponding name resolution solutions:
NOTE
Depending on your scenario, you may want to use the Azure DNS Private Zones feature, which is currently in Public Preview.
For more information, see Using Azure DNS for private domains.
Name resolution between VMs located Azure DNS Private Zones or Azure- Hostname or FQDN
in the same virtual network, or Azure provided name resolution
Cloud Services role instances in the
same cloud service.
Name resolution between VMs in Azure DNS Private Zones or, Customer- FQDN only
different virtual networks or role managed DNS servers forwarding
instances in different cloud services. queries between virtual networks for
resolution by Azure (DNS proxy). See
Name resolution using your own DNS
server.
Name resolution from an Azure App Customer-managed DNS servers FQDN only
Service (Web App, Function, or Bot) forwarding queries between virtual
using virtual network integration to role networks for resolution by Azure (DNS
instances or VMs in the same virtual proxy). See Name resolution using your
network. own DNS server.
Name resolution from App Service Web Customer-managed DNS servers FQDN only
Apps to VMs in the same virtual forwarding queries between virtual
network. networks for resolution by Azure (DNS
proxy). See Name resolution using your
own DNS server.
SCENARIO SOLUTION SUFFIX
Name resolution from App Service Web Customer-managed DNS servers FQDN only
Apps in one virtual network to VMs in a forwarding queries between virtual
different virtual network. networks for resolution by Azure (DNS
proxy). See Name resolution using your
own DNS server.
Reverse DNS for internal IPs. Name resolution using your own DNS Not applicable
server.
Name resolution between VMs or role Not applicable. Connectivity between Not applicable
instances located in different cloud VMs and role instances in different
services, not in a virtual network. cloud services is not supported outside
a virtual network.
NOTE
When using cloud services web and worker roles, you can also access the internal IP addresses of role instances using the
Azure Service Management REST API. For more information, see the Service Management REST API Reference. The address is
based on the role name and instance number.
Features
Azure-provided name resolution includes the following features:
Ease of use. No configuration is required.
High availability. You don't need to create and manage clusters of your own DNS servers.
You can use the service in conjunction with your own DNS servers, to resolve both on-premises and Azure host
names.
You can use name resolution between VMs and role instances within the same cloud service, without the need
for an FQDN.
You can use name resolution between VMs in virtual networks that use the Azure Resource Manager
deployment model, without need for an FQDN. Virtual networks in the classic deployment model require an
FQDN when you are resolving names in different cloud services.
You can use host names that best describe your deployments, rather than working with auto-generated names.
Considerations
Points to consider when you are using Azure-provided name resolution:
The Azure-created DNS suffix cannot be modified.
You cannot manually register your own records.
WINS and NetBIOS are not supported. You cannot see your VMs in Windows Explorer.
Host names must be DNS -compatible. Names must use only 0-9, a-z, and '-', and cannot start or end with a '-'.
DNS query traffic is throttled for each VM. Throttling shouldn't impact most applications. If request throttling is
observed, ensure that client-side caching is enabled. For more information, see DNS client configuration.
Only VMs in the first 180 cloud services are registered for each virtual network in a classic deployment model.
This limit does not apply to virtual networks in Azure Resource Manager.
The Azure DNS IP address is 168.63.129.16. This is a static IP address and will not change.
Client-side retries
DNS is primarily a UDP protocol. Because the UDP protocol doesn't guarantee message delivery, retry logic is
handled in the DNS protocol itself. Each DNS client (operating system) can exhibit different retry logic, depending
on the creator's preference:
Windows operating systems retry after one second, and then again after another two seconds, four seconds,
and another four seconds.
The default Linux setup retries after five seconds. We recommend changing the retry specifications to five
times, at one-second intervals.
Check the current settings on a Linux VM with cat /etc/resolv.conf . Look at the options line, for example:
The resolv.conf file is usually auto-generated, and should not be edited. The specific steps for adding the options
line vary by distribution:
Ubuntu (uses resolvconf):
1. Add the options line to /etc/resolvconf/resolv.conf.d/tail.
2. Run resolvconf -u to update.
SUSE (uses netconf):
1. Add timeout:1 attempts:5 to the NETCONFIG_DNS_RESOLVER_OPTIONS="" parameter in
/etc/sysconfig/network/config.
2. Run netconfig update to update.
CentOS (uses NetworkManager):
1. Add echo "options timeout:1 attempts:5" to /etc/NetworkManager/dispatcher.d/11-dhclient.
2. Update with service network restart .
NOTE
A role instance can perform name resolution of VMs within the same virtual network. It does so by using the FQDN, which
consists of the VM's host name and internal.cloudapp.net DNS suffix. However, in this case, name resolution is only
successful if the role instance has the VM name defined in the Role Schema (.cscfg file).
<Role name="<role-name>" vmName="<vm-name>">
Role instances that need to perform name resolution of VMs in another virtual network (FQDN by using the
internal.cloudapp.net suffix) have to do so by using the method described in this section (custom DNS servers forwarding
between the two virtual networks).
When you are using Azure-provided name resolution, Azure Dynamic Host Configuration Protocol (DHCP )
provides an internal DNS suffix (.internal.cloudapp.net) to each VM. This suffix enables host name resolution
because the host name records are in the internal.cloudapp.net zone. When you are using your own name
resolution solution, this suffix is not supplied to VMs because it interferes with other DNS architectures (like
domain-joined scenarios). Instead, Azure provides a non-functioning placeholder (reddog.microsoft.com).
If necessary, you can determine the internal DNS suffix by using PowerShell or the API:
For virtual networks in Azure Resource Manager deployment models, the suffix is available via the network
interface REST API, the Get-AzNetworkInterface PowerShell cmdlet, and the az network nic show Azure CLI
command.
In classic deployment models, the suffix is available via the Get Deployment API call or the Get-AzureVM -
Debug cmdlet.
If forwarding queries to Azure doesn't suit your needs, you should provide your own DNS solution. Your DNS
solution needs to:
Provide appropriate host name resolution, via DDNS, for example. If you are using DDNS, you might need to
disable DNS record scavenging. Azure DHCP leases are long, and scavenging might remove DNS records
prematurely.
Provide appropriate recursive resolution to allow resolution of external domain names.
Be accessible (TCP and UDP on port 53) from the clients it serves, and be able to access the internet.
Be secured against access from the internet, to mitigate threats posed by external agents.
NOTE
For best performance, when you are using Azure VMs as DNS servers, IPv6 should be disabled. A public IP address should be
assigned to each DNS server VM. For additional performance analysis and optimizations when you are using Windows Server
as your DNS server, see Name resolution performance of a recursive Windows DNS Server 2012 R2.
Web apps
Suppose you need to perform name resolution from your web app built by using App Service, linked to a virtual
network, to VMs in the same virtual network. In addition to setting up a custom DNS server that has a DNS
forwarder that forwards queries to Azure (virtual IP 168.63.129.16), perform the following steps:
1. Enable virtual network integration for your web app, if not done already, as described in Integrate your app
with a virtual network.
2. In the Azure portal, for the App Service plan hosting the web app, select Sync Network under
Networking, Virtual Network Integration.
If you need to perform name resolution from your web app built by using App Service, linked to a virtual network,
to VMs in a different virtual network, you have to use custom DNS servers on both virtual networks, as follows:
Set up a DNS server in your target virtual network, on a VM that can also forward queries to the recursive
resolver in Azure (virtual IP 168.63.129.16). An example DNS forwarder is available in the Azure Quickstart
Templates gallery and GitHub.
Set up a DNS forwarder in the source virtual network on a VM. Configure this DNS forwarder to forward
queries to the DNS server in your target virtual network.
Configure your source DNS server in your source virtual network’s settings.
Enable virtual network integration for your web app to link to the source virtual network, following the
instructions in Integrate your app with a virtual network.
In the Azure portal, for the App Service plan hosting the web app, select Sync Network under Networking,
Virtual Network Integration.
NOTE
Network connection properties, such as DNS server IPs, should not be edited directly within VMs. This is because they might
get erased during service heal when the virtual network adaptor gets replaced. This applies to both Windows and Linux VMs.
When you are using the Azure Resource Manager deployment model, you can specify DNS servers for a virtual
network and a network interface. For details, see Manage a virtual network and Manage a network interface.
NOTE
If you opt for custom DNS server for your virtual network, you must specify at least one DNS server IP address; otherwise,
virtual network will ignore the configuration and use Azure-provided DNS instead.
When you are using the classic deployment model, you can specify DNS servers for the virtual network in the
Azure portal or the Network Configuration file. For cloud services, you can specify DNS servers via the Service
Configuration file or by using PowerShell, with New -AzureVM.
NOTE
If you change the DNS settings for a virtual network or virtual machine that is already deployed, for the new DNS settings to
take effect, you must perform a DHCP lease renewal on all affected VMs in the virtual network. For VMs running the
Windows OS, you can do this by typing ipconfig /renew directly in the VM. The steps vary depending on the OS. See the
relevant documentation for your OS type.
Next steps
Azure Resource Manager deployment model:
Manage a virtual network
Manage a network interface
Classic deployment model:
Azure Service Configuration Schema
Virtual Network Configuration Schema
Configure a Virtual Network by using a network configuration file
Azure Private DNS FAQ
1/3/2020 • 4 minutes to read • Edit Online
The following are frequently asked questions about Azure private DNS.
Can the same private zone be used for several virtual networks for
resolution?
Yes. You can link a private DNS zone with thousands of virtual networks. For more information, see Azure DNS
Limits
What happens when I try to manually create a new DNS record into a
private zone that has the same hostname as an automatically
registered existing virtual machine in a linked virtual network?
You try to manually create a new DNS record into a private zone that has the same hostname as an existing,
automatically registered virtual machine in a linked virtual network. When you do, the new DNS record
overwrites the automatically registered virtual machine record. If you try to delete this manually created DNS
record from the zone again, the delete succeeds. The automatic registration happens again as long as the virtual
machine still exists and has a private IP attached to it. The DNS record is re-created automatically in the zone.
Will the DNS suffix on virtual machines within a linked virtual network
be changed to that of the private zone?
No. The DNS suffix on the virtual machines in your linked virtual network stays as the default Azure-provided
suffix ("*.internal.cloudapp.net"). You can manually change this DNS suffix on your virtual machines to that of the
private zone. For guidance on how to change this suffix refer to Use dynamic DNS to register hostnames in your
own DNS server
What are the usage limits for Azure DNS Private zones?
Refer to Azure DNS limits for details on the usage limits for Azure DNS private zones.
Next steps
Learn more about Azure Private DNS
Host load-balanced Azure web apps at the zone
apex
11/20/2019 • 5 minutes to read • Edit Online
The DNS protocol prevents the assignment of anything other than an A or AAAA record at the zone apex. An
example zone apex is contoso.com. This restriction presents a problem for application owners who have load-
balanced applications behind Traffic Manager. It isn't possible to point at the Traffic Manager profile from the zone
apex record. As a result, application owners must use a workaround. A redirect at the application layer must
redirect from the zone apex to another domain. An example is a redirect from contoso.com to www.contoso.com.
This arrangement presents a single point of failure for the redirect function.
With alias records, this problem no longer exists. Now application owners can point their zone apex record to a
Traffic Manager profile that has external endpoints. Application owners can point to the same Traffic Manager
profile that's used for any other domain within their DNS zone.
For example, contoso.com and www.contoso.com can point to the same Traffic Manager profile. This is the case as
long as the Traffic Manager profile has only external endpoints configured.
In this article, you learn how to create an alias record for your domain apex, and configure your Traffic Manager
profile end points for your web apps.
If you don’t have an Azure subscription, create a free account before you begin.
Prerequisites
You must have a domain name available that you can host in Azure DNS to test with. You must have full control of
this domain. Full control includes the ability to set the name server (NS ) records for the domain.
For instructions to host your domain in Azure DNS, see Tutorial: Host your domain in Azure DNS.
The example domain used for this tutorial is contoso.com, but use your own domain name.
NAME
(MUST BE UNIQUE
WITHIN
.AZUREWEBSITES.NET APP SERVICE
) RESOURCE GROUP RUNTIME STACK REGION PLAN/LOCATION
CUSTOM HEADER
TYPE NAME TARGET LOCATION SETTINGS
CUSTOM HEADER
TYPE NAME TARGET LOCATION SETTINGS
@ TXT App-01.azurewebsites.net
Next steps
To learn more about alias records, see the following articles:
Tutorial: Configure an alias record to refer to an Azure public IP address
Tutorial: Configure an alias record to support apex domain names with Traffic Manager
DNS FAQ
To learn how to migrate an active DNS name, see Migrate an active DNS name to Azure App Service.
How to manage DNS Zones in the Azure portal
12/23/2019 • 2 minutes to read • Edit Online
This article shows you how to manage your DNS zones by using the Azure portal. You can also manage your DNS
zones using the cross-platform Azure CLI or the Azure PowerShell.
3. On the Create DNS zone blade enter the following values, then click Create:
Location West US
NOTE
The resource group refers to the location of the resource group, and has no impact on the DNS zone. The DNS zone location
is always "global", and is not shown.
Next steps
Learn how to work with your DNS Zone and records by visiting Get started with Azure DNS using the Azure
portal.
How to manage DNS Zones using PowerShell
11/20/2019 • 7 minutes to read • Edit Online
This article shows you how to manage your DNS zones by using Azure PowerShell. You can also manage your
DNS zones using the cross-platform Azure CLI or the Azure portal.
This guide specifically deals with Public DNS zones. For information on using Azure PowerShell to manage
Private Zones in Azure DNS, see Get started with Azure DNS Private Zones using Azure PowerShell.
A DNS zone is used to host the DNS records for a particular domain. To start hosting your domain in Azure DNS,
you need to create a DNS zone for that domain name. Each DNS record for your domain is then created inside
this DNS zone.
For example, the domain 'contoso.com' may contain several DNS records, such as 'mail.contoso.com' (for a mail
server) and 'www.contoso.com' (for a web site).
When creating a DNS zone in Azure DNS:
The name of the zone must be unique within the resource group, and the zone must not exist already.
Otherwise, the operation fails.
The same zone name can be reused in a different resource group or a different Azure subscription.
Where multiple zones share the same name, each instance is assigned different name server addresses. Only
one set of addresses can be configured with the domain name registrar.
NOTE
You do not have to own a domain name to create a DNS zone with that domain name in Azure DNS. However, you do need
to own the domain to configure the Azure DNS name servers as the correct name servers for the domain name with the
domain name registrar.
For more information, see Delegate a domain to Azure DNS.
IMPORTANT
Using this Azure feature from PowerShell requires the AzureRM module installed. This is an older module only available for
Windows PowerShell 5.1 that no longer receives new features. The Az and AzureRM modules are not compatible when
installed for the same versions of PowerShell. If you need both versions:
1. Uninstall the Az module from a PowerShell 5.1 session.
2. Install the AzureRM module from a PowerShell 5.1 session.
3. Download and install PowerShell Core 6.x or later.
4. Install the Az module in a PowerShell Core session.
Verify that you have the following items before beginning your configuration.
An Azure subscription. If you don't already have an Azure subscription, you can activate your MSDN
subscriber benefits or sign up for a free account.
You need to install the latest version of the Azure Resource Manager PowerShell cmdlets. For more
information, see How to install and configure Azure PowerShell.
In addition, to use Private Zones (Public Preview ), you need to ensure you have the below PowerShell modules
and versions.
AzureRM.Dns - version 4.1.0 or above
AzureRM.Network - version 5.4.0 or above
The output of the above commands needs to show that the version of AzureRM.Dns is 4.1.0 or higher version,
and for AzureRM.Network is 5.4.0 or higher version.
In case your system has earlier versions, you can either install the latest version of Azure PowerShell, or download
and install the above modules from the PowerShell Gallery, using the links above next to the Module versions.
You can then install them using the below commands. Both the modules are required and are fully backwards
compatible.
Connect-AzureRmAccount
Get-AzureRmSubscription
The following example shows how to create a DNS zone with two Azure Resource Manager tags, project = demo
and env = test:
Azure DNS also supports private DNS zones. To learn more about private DNS zones, see Using Azure DNS for
private domains. For an example of how to create a private DNS zone, see Get started with Azure DNS private
zones using PowerShell.
Name : contoso.com
ResourceGroupName : myresourcegroup
Etag : 00000003-0000-0000-8ec2-f4879750d201
Tags : {project, env}
NameServers : {ns1-01.azure-dns.com., ns2-01.azure-dns.net., ns3-01.azure-dns.org.,
ns4-01.azure-dns.info.}
NumberOfRecordSets : 2
MaxNumberOfRecordSets : 5000
By omitting both the zone name and the resource group name from Get-AzureRmDnsZone , you can enumerate all
zones in the Azure subscription.
$zoneList = Get-AzureRmDnsZone
# Commit changes
Set-AzureRmDnsZone -Zone $zone
When using Set-AzureRmDnsZone with a $zone object, Etag checks are used to ensure concurrent changes are not
overwritten. You can use the optional -Overwrite switch to suppress these checks.
NOTE
Deleting a DNS zone also deletes all DNS records within the zone. This operation cannot be undone. If the DNS zone is in
use, services using the zone will fail when the zone is deleted.
To protect against accidental zone deletion, see How to protect DNS zones and records.
The zone object can also be piped instead of being passed as a parameter:
As with Set-AzureRmDnsZone , specifying the zone using a $zone object enables Etag checks to ensure concurrent
changes are not deleted. Use the -Overwrite switch to suppress these checks.
Confirmation prompts
The New-AzureRmDnsZone , Set-AzureRmDnsZone , and Remove-AzureRmDnsZone cmdlets all support confirmation
prompts.
Both New-AzureRmDnsZone and Set-AzureRmDnsZone prompt for confirmation if the $ConfirmPreference PowerShell
preference variable has a value of Medium or lower. Due to the potentially high impact of deleting a DNS zone, the
Remove-AzureRmDnsZone cmdlet prompts for confirmation if the $ConfirmPreference PowerShell variable has any
value other than None .
Since the default value for $ConfirmPreference is High , only Remove-AzureRmDnsZone prompts for confirmation by
default.
You can override the current $ConfirmPreference setting using the -Confirm parameter. If you specify -Confirm
or -Confirm:$True , the cmdlet prompts you for confirmation before it runs. If you specify -Confirm:$False , the
cmdlet does not prompt you for confirmation.
For more information about -Confirm and $ConfirmPreference , see About Preference Variables.
Next steps
Learn how to manage record sets and records in your DNS zone.
Learn how to delegate your domain to Azure DNS.
Review the Azure DNS PowerShell reference documentation.
How to manage DNS Zones in Azure DNS using the
Azure CLI
11/20/2019 • 5 minutes to read • Edit Online
This guide shows how to manage your DNS zones by using the cross-platform Azure CLI, which is available for
Windows, Mac and Linux. You can also manage your DNS zones using Azure PowerShell or the Azure portal.
This guide specifically deals with Public DNS zones. For information on using Azure CLI to manage Private Zones
in Azure DNS, see Get started with Azure DNS Private Zones using Azure CLI.
Introduction
A DNS zone is used to host the DNS records for a particular domain. To start hosting your domain in Azure DNS,
you need to create a DNS zone for that domain name. Each DNS record for your domain is then created inside
this DNS zone.
For example, the domain 'contoso.com' may contain several DNS records, such as 'mail.contoso.com' (for a mail
server) and 'www.contoso.com' (for a web site).
When creating a DNS zone in Azure DNS:
The name of the zone must be unique within the resource group, and the zone must not exist already.
Otherwise, the operation fails.
The same zone name can be reused in a different resource group or a different Azure subscription.
Where multiple zones share the same name, each instance is assigned different name server addresses. Only
one set of addresses can be configured with the domain name registrar.
NOTE
You do not have to own a domain name to create a DNS zone with that domain name in Azure DNS. However, you do need
to own the domain to configure the Azure DNS name servers as the correct name servers for the domain name with the
domain name registrar.
For more information, see Delegate a domain to Azure DNS.
az account list
Getting help
All Azure CLI commands relating to Azure DNS start with az network dns . Help is available for each command
using the --help option (short form -h ). For example:
The following example creates a DNS zone called contoso.com in the resource group called MyResourceGroup:
{
"etag": "00000002-0000-0000-3d4d-64aa3689d201",
"id": "/subscriptions/147a22e9-2356-4e56-b3de-
1f5842ae4a3b/resourceGroups/myresourcegroup/providers/Microsoft.Network/dnszones/contoso.com",
"location": "global",
"maxNumberOfRecordSets": 5000,
"name": "contoso.com",
"nameServers": [
"ns1-04.azure-dns.com.",
"ns2-04.azure-dns.net.",
"ns3-04.azure-dns.org.",
"ns4-04.azure-dns.info."
],
"numberOfRecordSets": 4,
"resourceGroup": "myresourcegroup",
"tags": {},
"type": "Microsoft.Network/dnszones"
}
Note that DNS records are not returned by az network dns zone show . To list DNS records, use
az network dns record-set list .
This command does not update any of the DNS record sets within the zone (see How to Manage DNS records). It
is only used to update properties of the zone resource itself. These properties are currently limited to the Azure
Resource Manager 'tags' for the zone resource.
The following example shows how to update the tags on a DNS zone. The existing tags are replaced by the value
specified.
az network dns zone update --resource-group myresourcegroup --name contoso.com --set tags.team=support
NOTE
Deleting a DNS zone also deletes all DNS records within the zone. This operation cannot be undone. If the DNS zone is in
use, services using the zone will fail when the zone is deleted.
To protect against accidental zone deletion, see How to protect DNS zones and records.
This command prompts for confirmation. The optional --yes switch suppresses this prompt.
The following example shows how to delete the zone contoso.com from resource group MyResourceGroup.
Next steps
Learn how to manage record sets and records in your DNS zone.
Learn how to delegate your domain to Azure DNS.
Manage DNS records and record sets by using the
Azure portal
11/20/2019 • 4 minutes to read • Edit Online
This article shows you how to manage record sets and records for your DNS zone by using the Azure portal.
It's important to understand the difference between DNS record sets and individual DNS records. A record set is
a collection of records in a zone that have the same name and are the same type. For more information, see
Create DNS record sets and records by using the Azure portal.
3. Click Save at the top of the blade to save your settings. Then close the blade.
4. In the corner, you will see that the record is saving.
After the record has been saved, the values on the DNS zone blade will reflect the new record.
Update a record
When you update a record in an existing record set, the fields you can update depend on the type of record you're
working with.
1. On the Record set properties blade for your record set, search for the record.
2. Modify the record. When you modify a record, you can change the available settings for the record. In the
following example, the IP address field is selected, and the IP address is in the process of being modified.
3. Click Save at the top of the blade to save your settings. In the upper right corner, you'll see the notification
that the record has been saved.
After the record has been saved, the values for the record set on the DNS zone blade will reflect the updated
record.
This article shows you how to manage DNS records for your DNS zone by using Azure PowerShell. DNS records
can also be managed by using the cross-platform Azure CLI or the Azure portal.
The examples in this article assume you have already installed Azure PowerShell, signed in, and created a DNS
zone.
NOTE
This article has been updated to use the new Azure PowerShell Az module. You can still use the AzureRM module, which will
continue to receive bug fixes until at least December 2020. To learn more about the new Az module and AzureRM
compatibility, see Introducing the new Azure PowerShell Az module. For Az module installation instructions, see Install Azure
PowerShell.
Introduction
Before creating DNS records in Azure DNS, you first need to understand how Azure DNS organizes DNS
records into DNS record sets.
Record names
In Azure DNS, records are specified by using relative names. A fully qualified domain name (FQDN ) includes the
zone name, whereas a relative name does not. For example, the relative record name www in the zone
contoso.com gives the fully qualified record name www.contoso.com .
An apex record is a DNS record at the root (or apex) of a DNS zone. For example, in the DNS zone contoso.com ,
an apex record also has the fully qualified name contoso.com (this is sometimes called a naked domain). By
convention, the relative name '@' is used to represent apex records.
Record types
Each DNS record has a name and a type. Records are organized into various types according to the data they
contain. The most common type is an 'A' record, which maps a name to an IPv4 address. Another common type
is an 'MX' record, which maps a name to a mail server.
Azure DNS supports all common DNS record types: A, AAAA, CAA, CNAME, MX, NS, PTR, SOA, SRV, and TXT.
Note that SPF records are represented using TXT records.
Record sets
Sometimes you need to create more than one DNS record with a given name and type. For example, suppose the
'www.contoso.com' web site is hosted on two different IP addresses. The website requires two different A records,
one for each IP address. Here is an example of a record set:
Azure DNS manages all DNS records using record sets. A record set (also known as a resource record set) is the
collection of DNS records in a zone that have the same name and are of the same type. Most record sets contain
a single record. However, examples like the one above, in which a record set contains more than one record, are
not uncommon.
For example, suppose you have already created an A record 'www' in the zone 'contoso.com', pointing to the IP
address '134.170.185.46' (the first record above). To create the second record you would add that record to the
existing record set, rather than create an additional record set.
The SOA and CNAME record types are exceptions. The DNS standards don't permit multiple records with the
same name for these types, therefore these record sets can only contain a single record.
For more information about DNS records in Azure DNS, see DNS zones and records.
To create a record set at the 'apex' of a zone (in this case, 'contoso.com'), use the record set name '@' (excluding
quotation marks):
If you need to create a record set containing more than one record, first create a local array and add the records,
then pass the array to New-AzDnsRecordSet as follows:
$aRecords = @()
$aRecords += New-AzDnsRecordConfig -IPv4Address "1.2.3.4"
$aRecords += New-AzDnsRecordConfig -IPv4Address "2.3.4.5"
New-AzDnsRecordSet -Name www –ZoneName "contoso.com" -ResourceGroupName MyResourceGroup -Ttl 3600 -RecordType
A -DnsRecords $aRecords
Record set metadata can be used to associate application-specific data with each record set, as key-value pairs.
The following example shows how to create a record set with two metadata entries, 'dept=finance' and
'environment=production'.
NOTE
The DNS standards do not permit CNAME records at the apex of a zone ( -Name '@' ), nor do they permit record sets
containing more than one record.
For more information, see CNAME records.
Alternatively, you can also specify the zone using a zone object, passed using the -Zone parameter.
The following example shows how all record sets of a given type can be retrieved by specifying the record type
while omitting the record set name:
To retrieve all record sets with a given name, across record types, you need to retrieve all record sets and then
filter the results:
In all the above examples, the zone can be specified either by using the -ZoneName and -ResourceGroupName
parameters (as shown), or by specifying a zone object:
2. Add the new record to the local record set. This is an off-line operation.
Using Set-AzDnsRecordSet replaces the existing record set in Azure DNS (and all records it contains) with the
record set specified. Etag checks are used to ensure concurrent changes are not overwritten. You can use the
optional -Overwrite switch to suppress these checks.
This sequence of operations can also be piped, meaning you pass the record set object by using the pipe rather
than passing it as a parameter:
The examples above show how to add an 'A' record to an existing record set of type 'A'. A similar sequence of
operations is used to add records to record sets of other types, substituting the -Ipv4Address parameter of
Add-AzDnsRecordConfig with other parameters specific to each record type. The parameters for each record type
are the same as for the New-AzDnsRecordConfig cmdlet, as shown in Additional record type examples above.
Record sets of type 'CNAME' or 'SOA' cannot contain more than one record. This constraint arises from the DNS
standards. It is not a limitation of Azure DNS.
2. Remove the record from the local record set object. This is an off-line operation. The record that's being
removed must be an exact match with an existing record across all parameters.
3. Commit the change back to the Azure DNS service. Use the optional -Overwrite switch to suppress Etag
checks for concurrent changes.
Using the above sequence to remove the last record from a record set does not delete the record set, rather it
leaves an empty record set. To remove a record set entirely, see Delete a record set.
Similarly to adding records to a record set, the sequence of operations to remove a record set can also be piped:
Different record types are supported by passing the appropriate type-specific parameters to
Remove-AzDnsRecordSet . The parameters for each record type are the same as for the New-AzDnsRecordConfig
cmdlet, as shown in Additional record type examples above.
# Commit changes
Set-AzDnsRecordSet -RecordSet $rs
Delete a record set
Record sets can be deleted by using the Remove-AzDnsRecordSet cmdlet. Deleting a record set also deletes all
records within the record set.
NOTE
You cannot delete the SOA and NS record sets at the zone apex ( -Name '@' ). Azure DNS created these automatically when
the zone was created, and deletes them automatically when the zone is deleted.
The following example shows how to delete a record set. In this example, the record set name, record set type,
zone name, and resource group are each specified explicitly.
Alternatively, the record set can be specified by name and type, and the zone specified using an object:
As a third option, the record set itself can be specified using a record set object:
When you specify the record set to be deleted by using a record set object, Etag checks are used to ensure
concurrent changes are not deleted. You can use the optional -Overwrite switch to suppress these checks.
The record set object can also be piped instead of being passed as a parameter:
Confirmation prompts
The New-AzDnsRecordSet , Set-AzDnsRecordSet , and Remove-AzDnsRecordSet cmdlets all support confirmation
prompts.
Each cmdlet prompts for confirmation if the $ConfirmPreference PowerShell preference variable has a value of
Medium or lower. Since the default value for $ConfirmPreference is High , these prompts are not given when
using the default PowerShell settings.
You can override the current $ConfirmPreference setting using the -Confirm parameter. If you specify -Confirm
or -Confirm:$True , the cmdlet prompts you for confirmation before it runs. If you specify -Confirm:$False , the
cmdlet does not prompt you for confirmation.
For more information about -Confirm and $ConfirmPreference , see About Preference Variables.
Next steps
Learn more about zones and records in Azure DNS.
Learn how to protect your zones and records when using Azure DNS.
Review the Azure DNS PowerShell reference documentation.
Manage DNS records and recordsets in Azure DNS
using the Azure CLI
1/19/2020 • 13 minutes to read • Edit Online
This article shows you how to manage DNS records for your DNS zone by using the cross-platform Azure CLI,
which is available for Windows, Mac and Linux. You can also manage your DNS records using Azure PowerShell
or the Azure portal.
The examples in this article assume you have already installed the Azure CLI, signed in, and created a DNS zone.
Introduction
Before creating DNS records in Azure DNS, you first need to understand how Azure DNS organizes DNS
records into DNS record sets.
Record names
In Azure DNS, records are specified by using relative names. A fully qualified domain name (FQDN ) includes the
zone name, whereas a relative name does not. For example, the relative record name www in the zone
contoso.com gives the fully qualified record name www.contoso.com .
An apex record is a DNS record at the root (or apex) of a DNS zone. For example, in the DNS zone contoso.com ,
an apex record also has the fully qualified name contoso.com (this is sometimes called a naked domain). By
convention, the relative name '@' is used to represent apex records.
Record types
Each DNS record has a name and a type. Records are organized into various types according to the data they
contain. The most common type is an 'A' record, which maps a name to an IPv4 address. Another common type
is an 'MX' record, which maps a name to a mail server.
Azure DNS supports all common DNS record types: A, AAAA, CAA, CNAME, MX, NS, PTR, SOA, SRV, and TXT.
Note that SPF records are represented using TXT records.
Record sets
Sometimes you need to create more than one DNS record with a given name and type. For example, suppose the
'www.contoso.com' web site is hosted on two different IP addresses. The website requires two different A records,
one for each IP address. Here is an example of a record set:
Azure DNS manages all DNS records using record sets. A record set (also known as a resource record set) is the
collection of DNS records in a zone that have the same name and are of the same type. Most record sets contain
a single record. However, examples like the one above, in which a record set contains more than one record, are
not uncommon.
For example, suppose you have already created an A record 'www' in the zone 'contoso.com', pointing to the IP
address '134.170.185.46' (the first record above). To create the second record you would add that record to the
existing record set, rather than create an additional record set.
The SOA and CNAME record types are exceptions. The DNS standards don't permit multiple records with the
same name for these types, therefore these record sets can only contain a single record.
For more information about DNS records in Azure DNS, see DNS zones and records.
When creating a record, you need to specify the resource group name, zone name, record set name, the record
type, and the details of the record being created. The record set name given must be a relative name, meaning it
must exclude the zone name.
If the record set does not already exist, this command creates it for you. If the record set already exists, this
command adds the record you specify to the existing record set.
If a new record set is created, a default time-to-live (TTL ) of 3600 is used. For instructions on how to use different
TTLs, see Create a DNS record set.
The following example creates an A record called www in the zone contoso.com in the resource group
MyResourceGroup. The IP address of the A record is 1.2.3.4.
To create a record set in the apex of the zone (in this case, "contoso.com"), use the record name "@", including the
quotation marks:
az network dns record-set a create --resource-group myresourcegroup --zone-name contoso.com --name www --ttl
60
The following example creates a record set with two metadata entries, "dept=finance" and
"environment=production", by using the --metadata parameter :
az network dns record-set a create --resource-group myresourcegroup --zone-name contoso.com --name www --
metadata "dept=finance" "environment=production"
az network dns record-set aaaa add-record --resource-group myresourcegroup --zone-name contoso.com --record-
set-name test-aaaa --ipv6-address 2607:f8b0:4009:1803::1005
az network dns record-set caa add-record --resource-group myresourcegroup --zone-name contoso.com --record-
set-name test-caa --flags 0 --tag "issue" --value "ca1.contoso.com"
NOTE
The DNS standards do not permit CNAME records at the apex of a zone ( --Name "@" ), nor do they permit record sets
containing more than one record.
For more information, see CNAME records.
az network dns record-set cname set-record --resource-group myresourcegroup --zone-name contoso.com --record-
set-name test-cname --cname www.contoso.com
Create an MX record
In this example, we use the record set name "@" to create the MX record at the zone apex (in this case,
"contoso.com").
Create an NS record
az network dns record-set ns add-record --resource-group myresourcegroup --zone-name contoso.com --record-
set-name test-ns --nsdname ns1.contoso.com
az network dns record-set ptr add-record --resource-group myresourcegroup --zone-name contoso.com --record-
set-name my-arpa.zone.com --ptrdname myservice.contoso.com
az network dns record-set srv add-record --resource-group myresourcegroup --zone-name contoso.com --record-
set-name _sip._tls --priority 10 --weight 5 --port 8080 --target sip.contoso.com
az network dns record-set txt add-record --resource-group myresourcegroup --zone-name contoso.com --record-
set-name test-txt --value "This is a TXT record"
az network dns record-set a show --resource-group myresourcegroup --zone-name contoso.com --name www
This example returns all record sets in the zone contoso.com, in resource group MyResourceGroup, regardless of
name or record type:
This example returns all record sets that match the given record type (in this case, 'A' records):
az network dns record-set a list --resource-group myresourcegroup --zone-name contoso.com
You cannot add, remove, or modify the records in the automatically created NS record set at the zone apex (
--Name "@" , including quote marks). For this record set, the only changes permitted are to modify the record set
TTL and metadata.
To modify a CNAME record
Unlike most other record types, a CNAME record set can only contain a single record. Therefore, you cannot
replace the current value by adding a new record and removing the existing record, as for other record types.
Instead, to modify a CNAME record, use az network dns record-set cname set-record . For help, see
az network dns record-set cname set-record --help
The example modifies the CNAME record set www in the zone contoso.com, in resource group
MyResourceGroup, to point to 'www.fabrikam.net' instead of its existing value:
az network dns record-set cname set-record --resource-group myresourcegroup --zone-name contoso.com --record-
set-name test-cname --cname www.fabrikam.net
az network dns record-set soa update --resource-group myresourcegroup --zone-name contoso.com --email
admin.contoso.com
az network dns record-set a update --resource-group myresourcegroup --zone-name contoso.com --name www --set
ttl=60
The following example shows how to modify a record set with two metadata entries, "dept=finance" and
"environment=production". Note that any existing metadata is replaced by the values given.
az network dns record-set a update --resource-group myresourcegroup --zone-name contoso.com --name www --set
metadata.dept=finance metadata.environment=production
NOTE
You cannot delete the SOA and NS record sets at the zone apex ( --name "@" ). These are created automatically when the
zone was created, and are deleted automatically when the zone is deleted.
The following example deletes the record set named www of type A from the zone contoso.com in resource group
MyResourceGroup:
az network dns record-set a delete --resource-group myresourcegroup --zone-name contoso.com --name www
You are prompted to confirm the delete operation. To suppress this prompt, use the --yes switch.
Next steps
Learn more about zones and records in Azure DNS.
Learn how to protect your zones and records when using Azure DNS.
Host reverse DNS lookup zones in Azure DNS
1/19/2020 • 7 minutes to read • Edit Online
NOTE
This article has been updated to use the new Azure PowerShell Az module. You can still use the AzureRM module, which will
continue to receive bug fixes until at least December 2020. To learn more about the new Az module and AzureRM
compatibility, see Introducing the new Azure PowerShell Az module. For Az module installation instructions, see Install Azure
PowerShell.
This article explains how to host the reverse DNS lookup zones for your assigned IP ranges in Azure DNS. The IP
ranges represented by the reverse lookup zones must be assigned to your organization, typically by your ISP.
To configure reverse DNS for an Azure-owned IP address that's assigned to your Azure service, see Configure
reverse DNS for services hosted in Azure.
Before you read this article, you should be familiar with the overview of reverse DNS and support in Azure.
This article walks you through the steps to create your first reverse lookup DNS zone and record by using the
Azure portal, Azure PowerShell, Azure classic CLI, or Azure CLI.
NOTE
When you're creating classless reverse DNS lookup zones in Azure DNS, you must use a hyphen ( - ) rather than a forward
slash ( / ) in the zone name.
For example, for the IP range 192.0.2.128/26, you must use 128-26.2.0.192.in-addr.arpa as the zone name instead of
128/26.2.0.192.in-addr.arpa .
Although the DNS standards support both methods, Azure DNS doesn't support DNS zone names that contain for forward
slash ( / ) character.
The following example shows how to create a Class C reverse DNS zone named 2.0.192.in-addr.arpa in Azure
DNS via the Azure portal:
Resource group location defines the location for the resource group. It has no impact on the DNS zone. The
DNS zone location is always "global," and is not shown.
The following examples show how to complete this task by using Azure PowerShell and Azure CLI.
PowerShell
Azure CLI
IPv6
The name of an IPv6 reverse lookup zone should be in the following form:
<IPv6 network prefix in reverse order>.ip6.arpa . For examples, see Overview of reverse DNS and support in
Azure.
The following example shows how to create an IPv6 reverse DNS lookup zone named
0.0.0.0.d.c.b.a.8.b.d.0.1.0.0.2.ip6.arpa in Azure DNS via the Azure portal:
Resource group location defines the location for the resource group. It has no impact on the DNS zone. The
DNS zone location is always "global," and is not shown.
The following examples show how to complete this task by using Azure PowerShell and Azure CLI.
PowerShell
Azure CLI
2. The name of the record set for a PTR record needs to be the rest of the IPv4 address in reverse order.
In this example, the first three octets are already populated as part of the zone name (.2.0.192). Therefore,
only the last octet is supplied in the Name box. For example, you might name your record set 15 for a
resource whose IP address is 192.0.2.15.
3. For Type, select PTR.
4. For DOMAIN NAME, enter the fully qualified domain name (FQDN ) of the resource that uses the IP.
5. Select OK at the bottom of the pane to create the DNS record.
The following examples show how to complete this task by using PowerShell or Azure CLI.
PowerShell
azure network dns record-set add-record MyResourceGroup 2.0.192.in-addr.arpa 15 PTR --ptrdname dc1.contoso.com
Azure CLI
IPv6
The following example walks you through the process of creating new PTR record. For other record types and to
modify existing records, see Manage DNS records and record sets by using the Azure portal.
1. At the top of the DNS zone pane, select + Record set to open the Add record set pane.
2. The name of the record set for a PTR record needs to be the rest of the IPv6 address in reverse order. It
must not include any zero compression.
In this example, the first 64 bits of the IPv6 are already populated as part of the zone name
(0.0.0.0.c.d.b.a.8.b.d.0.1.0.0.2.ip6.arpa). Therefore, only the last 64 bits are supplied in the Name box. The last
64 bits of the IP address are entered in reverse order, with a period as the delimiter between each
hexadecimal number. For example, you might name your record set e.5.0.4.9.f.a.1.c.b.0.1.4.2.5.f for a
resource whose IP address is 2001:0db8:abdc:0000:f524:10bc:1af9:405e.
3. For Type, select PTR.
4. For DOMAIN NAME, enter the FQDN of the resource that uses the IP.
5. Select OK at the bottom of the pane to create the DNS record.
The following examples show how to complete this task by using PowerShell or Azure CLI.
PowerShell
Azure CLI
View records
To view the records that you created, browse to your DNS zone in the Azure portal. In the lower part of the DNS
zone pane, you can see the records for the DNS zone. You should see the default NS and SOA records, plus any
new records that you've created. The NS and SOA records are created in every zone.
IPv4
The DNS zone pane shows the IPv4 PTR records:
The following examples show how to view the PTR records by using PowerShell or Azure CLI.
PowerShell
Azure CLI
IPv6
The DNS zone pane shows the IPv6 PTR records:
The following examples show how to view the records by using PowerShell or Azure CLI.
PowerShell
Azure CLI
FAQ
Can I host reverse DNS lookup zones for my ISP-assigned IP blocks on Azure DNS?
Yes. Hosting the reverse lookup (ARPA) zones for your own IP ranges in Azure DNS is fully supported.
Create the reverse lookup zone in Azure DNS as explained in this article, and then work with your ISP to delegate
the zone. You can then manage the PTR records for each reverse lookup in the same way as other record types.
How much does hosting my reverse DNS lookup zone cost?
Hosting the reverse DNS lookup zone for your ISP -assigned IP block in Azure DNS is charged at standard Azure
DNS rates.
Can I host reverse DNS lookup zones for both IPv4 and IPv6 addresses in Azure DNS?
Yes. This article explains how to create both IPv4 and IPv6 reverse DNS lookup zones in Azure DNS.
Can I import an existing reverse DNS lookup zone?
Yes. You can use Azure CLI to import existing DNS zones into Azure DNS. This method works for both forward
lookup zones and reverse lookup zones.
For more information, see Import and export a DNS zone file using Azure CLI.
Next steps
For more information on reverse DNS, see reverse DNS lookup on Wikipedia.
Learn how to manage reverse DNS records for your Azure services.
Configure reverse DNS for services hosted in Azure
11/20/2019 • 6 minutes to read • Edit Online
NOTE
This article has been updated to use the new Azure PowerShell Az module. You can still use the AzureRM module, which
will continue to receive bug fixes until at least December 2020. To learn more about the new Az module and AzureRM
compatibility, see Introducing the new Azure PowerShell Az module. For Az module installation instructions, see Install
Azure PowerShell.
This article explains how to configure reverse DNS lookups for services hosted in Azure.
Services in Azure use IP addresses assigned by Azure and owned by Microsoft. These reverse DNS records (PTR
records) must be created in the corresponding Microsoft-owned reverse DNS lookup zones. This article explains
how to do this.
This scenario should not be confused with the ability to host the reverse DNS lookup zones for your assigned IP
ranges in Azure DNS. In this case, the IP ranges represented by the reverse lookup zone must be assigned to
your organization, typically by your ISP.
Before reading this article, you should be familiar with this Overview of reverse DNS and support in Azure.
In Azure DNS, compute resources (such as virtual machines, virtual machine scale sets, or Service Fabric
clusters) are exposed via a PublicIpAddress resource. Reverse DNS lookups are configured using the
'ReverseFqdn' property of the PublicIpAddress.
Reverse DNS is not currently supported for the Azure App Service.
To add reverse DNS to an existing PublicIpAddress that doesn't already have a DNS name, you must also specify
a DNS name:
To add reverse DNS to an existing PublicIpAddress that doesn't already have a DNS name, you must also specify
a DNS name:
Azure CLI
To add reverse DNS to an existing PublicIpAddress:
To add reverse DNS to an existing PublicIpAddress that doesn't already have a DNS name, you must also specify
a DNS name:
Azure CLI
az network public-ip create --name PublicIp --resource-group MyResourceGroup --location westcentralus --dns-
name contosoapp1 --reverse-fqdn contosoapp1.westcentralus.cloudapp.azure.com
Azure CLI
Azure CLI
New-AzureService –ServiceName "contosoapp1" –Location "West US" –Description "App1 with Reverse DNS" –
ReverseDnsFqdn "contosoapp1.cloudapp.net."
Get-AzureService "contosoapp1"
Set-AzureService –ServiceName "contosoapp1" –Description "App1 with Reverse DNS" –ReverseDnsFqdn ""
FAQ
How much do reverse DNS records cost?
They're free! There is no additional cost for reverse DNS records or queries.
Will my reverse DNS records resolve from the internet?
Yes. Once you set the reverse DNS property for your Azure service, Azure manages all the DNS delegations and
DNS zones required to ensure that reverse DNS record resolves for all Internet users.
Are default reverse DNS records created for my Azure services?
No. Reverse DNS is an opt-in feature. No default reverse DNS records are created if you choose not to configure
them.
What is the format for the fully-qualified domain name (FQDN )?
FQDNs are specified in forward order, and must be terminated by a dot (for example, "app1.contoso.com.").
What happens if the validation check for the reverse DNS I've specified fails?
Where the reverse DNS validation check fails, the operation to configure the reverse DNS record fails. Correct
the reverse DNS value as required, and retry.
Can I configure reverse DNS for Azure App Service?
No. Reverse DNS is not supported for the Azure App Service.
Can I configure multiple reverse DNS records for my Azure service?
No. Azure supports a single reverse DNS record for each Azure Cloud Service or PublicIpAddress.
Can I configure reverse DNS for IPv6 PublicIpAddress resources?
No. Azure currently supports reverse DNS only for IPv4 PublicIpAddress resources and Cloud Services.
Can I send emails to external domains from my Azure Compute services?
The technical ability to send email directly from an Azure deployment depends on the subscription type.
Regardless of subscription type, Microsoft recommends using trusted mail relay services to send outgoing mail.
For further details, see Enhanced Azure Security for sending Emails – November 2017 Update.
Next steps
For more information on reverse DNS, see reverse DNS lookup on Wikipedia.
Learn how to host the reverse lookup zone for your ISP -assigned IP range in Azure DNS.
Import and export a DNS zone file using the Azure
CLI
11/14/2019 • 6 minutes to read • Edit Online
This article walks you through how to import and export DNS zone files for Azure DNS using the Azure CLI.
az network dns zone import -g <resource group> -n <zone name> -f <zone file name>
Values:
<resource group> is the name of the resource group for the zone in Azure DNS.
<zone name> is the name of the zone.
<zone file name> is the path/name of the zone file to be imported.
If a zone with this name does not exist in the resource group, it is created for you. If the zone already exists, the
imported record sets are merged with existing record sets.
Step 1. Import a zone file
To import a zone file for the zone contoso.com.
1. If you don't have one already, you need to create a Resource Manager resource group.
2. To import the zone contoso.com from the file contoso.com.txt into a new DNS zone in the resource
group myresourcegroup, you will run the command az network dns zone import .
This command loads the zone file and parses it. The command executes a series of commands on the
Azure DNS service to create the zone and all the record sets in the zone. The command reports progress in
the console window, along with any errors or warnings. Because record sets are created in series, it may
take a few minutes to import a large zone file.
You can list the records by using the Azure CLI command az network dns record-set ns list .
You can use nslookup to verify name resolution for the records. Because the zone isn't delegated yet, you
need to specify the correct Azure DNS name servers explicitly. The following sample shows how to retrieve
the name server names assigned to the zone. This also shows how to query the "www" record by using
nslookup .
[
{
.......
"name": "@",
"nsRecords": [
{
"additionalProperties": {},
"nsdname": "ns1-03.azure-dns.com."
},
{
"additionalProperties": {},
"nsdname": "ns2-03.azure-dns.net."
},
{
"additionalProperties": {},
"nsdname": "ns3-03.azure-dns.org."
},
{
"additionalProperties": {},
"nsdname": "ns4-03.azure-dns.info."
}
],
"resourceGroup": "myresourcegroup",
"ttl": 86400,
"type": "Microsoft.Network/dnszones/NS"
}
]
Server: ns1-01.azure-dns.com
Address: 40.90.4.1
Name:www.contoso.com
Addresses: 134.170.185.46
134.170.188.221
Values:
<resource group> is the name of the resource group for the zone in Azure DNS.
<zone name> is the name of the zone.
<zone file name> is the path/name of the zone file to be exported.
As with the zone import, you first need to sign in, choose your subscription, and configure the Azure CLI to use
Resource Manager mode.
To export a zone file
To export the existing Azure DNS zone contoso.com in resource group myresourcegroup to the file
contoso.com.txt (in the current folder), run azure network dns zone export . This command calls the Azure DNS
service to enumerate record sets in the zone and export the results to a BIND -compatible zone file.
Next steps
Learn how to manage record sets and records in your DNS zone.
Learn how to delegate your domain to Azure DNS.
Delegate an Azure DNS subdomain
11/20/2019 • 2 minutes to read • Edit Online
You can use the Azure portal to delegate a DNS subdomain. For example, if you own the contoso.com domain, you
can delegate a subdomain called engineering to another, separate zone that you can administer separately from the
contoso.com zone.
If you prefer, you can delegate a subdomain using Azure PowerShell.
Prerequisites
To delegate an Azure DNS subdomain, you must first delegate your public domain to Azure DNS. See Delegate a
domain to Azure DNS for instructions on how to configure your name servers for delegation. Once your domain is
delegated to your Azure DNS zone, you can delegate your subdomain.
NOTE
Contoso.com is used as an example throughout this article. Substitute your own domain name for contoso.com.
Create an NS record
Next, create a name server (NS ) record for the engineering zone.
1. Navigate to the zone for the parent domain.
2. Select + Record set.
3. On the Add record set pane, type engineering in the Name text box.
4. For Type, select NS.
5. Under Name server, enter the four name servers that you recorded previously from the engineering zone.
6. Click OK.
Next steps
Learn how to configure reverse DNS for services hosted in Azure.
Delegate an Azure DNS subdomain using Azure
PowerShell
11/20/2019 • 2 minutes to read • Edit Online
You can use Azure PowerShell to delegate a DNS subdomain. For example, if you own the contoso.com domain,
you can delegate a subdomain called engineering to another, separate zone that you can administer separately
from the contoso.com zone.
If you prefer, you can delegate a subdomain using the Azure Portal.
NOTE
Contoso.com is used as an example throughout this article. Substitute your own domain name for contoso.com.
If you don’t have an Azure subscription, create a free account before you begin.
OPTION EXAMPLE/LINK
Prerequisites
To delegate an Azure DNS subdomain, you must first delegate your public domain to Azure DNS. See Delegate a
domain to Azure DNS for instructions on how to configure your name servers for delegation. Once your domain is
delegated to your Azure DNS zone, you can delegate your subdomain.
Create an NS record
Next, create a name server (NS ) record for the engineering zone in the contoso.com zone.
$Records = @()
$Records += New-AzDnsRecordConfig -Nsdname <name server 1 noted previously>
$Records += New-AzDnsRecordConfig -Nsdname <name server 2 noted previously>
$Records += New-AzDnsRecordConfig -Nsdname <name server 3 noted previously>
$Records += New-AzDnsRecordConfig -Nsdname <name server 4 noted previously>
$RecordSet = New-AzDnsRecordSet -Name engineering -RecordType NS -ResourceGroupName <resource group name> -TTL
3600 -ZoneName contoso.com -DnsRecords $Records
Next steps
Learn how to configure reverse DNS for services hosted in Azure.
How Azure DNS works with other Azure services
11/19/2019 • 2 minutes to read • Edit Online
Azure DNS is a hosted DNS management and name resolution service. You can use it to create public DNS names
for other applications and services that you deploy in Azure. Creating a name for an Azure service in your custom
domain is simple. You just add a record of the correct type for your service.
For dynamically allocated IP addresses, you can create a DNS CNAME record that maps to the DNS name that
Azure created for your service. DNS standards prevent you from using a CNAME record for the zone apex. You
can use an alias record instead. For more information, see Tutorial: Configure an alias record to refer to an
Azure Public IP address.
For statically allocated IP addresses, you can create a DNS A record by using any name, which includes a naked
domain name at the zone apex.
The following table outlines the supported record types you can use for various Azure services. As the table shows,
Azure DNS supports only DNS records for Internet-facing network resources. Azure DNS can't be used for name
resolution of internal, private addresses.
Azure Application Gateway Front-end public IP You can create a DNS A or CNAME
record.
Azure Load Balancer Front-end public IP You can create a DNS A or CNAME
record. Load Balancer can have an IPv6
public IP address that's dynamically
assigned. Create a CNAME record for an
IPv6 address.
Azure Traffic Manager Public name You can create an alias record that
maps to the trafficmanager.net name
assigned to your Traffic Manager profile.
For more information, see Tutorial:
Configure an alias record to support
apex domain names with Traffic
Manager.
Azure Resource Manager VMs Public IP Resource Manager VMs can have public
IP addresses. A VM with a public IP
address also can be behind a load
balancer. You can create a DNS A,
CNAME, or alias record for the public
address. You can use this custom name
to bypass the VIP on the load balancer.
NOTE
This article has been updated to use the new Azure PowerShell Az module. You can still use the AzureRM module, which will
continue to receive bug fixes until at least December 2020. To learn more about the new Az module and AzureRM
compatibility, see Introducing the new Azure PowerShell Az module. For Az module installation instructions, see Install Azure
PowerShell.
DNS zones and records are critical resources. Deleting a DNS zone or even just a single DNS record can result in
a total service outage. It is therefore important that critical DNS zones and records are protected against
unauthorized or accidental changes.
This article explains how Azure DNS enables you to protect your DNS zones and records against such changes.
We apply two powerful security features provided by Azure Resource Manager: role-based access control and
resource locks.
Record-set level RBAC permissions can also be granted using Azure PowerShell:
# Grant permissions to a specific record set
New-AzRoleAssignment -SignInName "<user email address>" -RoleDefinitionName "DNS Zone Contributor" -Scope
"/subscriptions/<subscription id>/resourceGroups/<resource group
name>/providers/Microsoft.Network/dnszones/<zone name>/<record type>/<record name>"
Custom roles
The built-in DNS Zone Contributor role enables full control over a DNS resource. It is also possible to build your
own customer Azure roles, to provide even finer-grained control.
Consider again the example in which a CNAME record in the zone customers.contoso.com is created for each
Contoso Corporation customer account. The account used to manage these CNAMEs should be granted
permission to manage CNAME records only. It is then unable to modify records of other types (such as changing
MX records) or perform zone-level operations such as zone delete.
The following example shows a custom role definition for managing CNAME records only:
{
"Name": "DNS CNAME Contributor",
"Id": "",
"IsCustom": true,
"Description": "Can manage DNS CNAME records only.",
"Actions": [
"Microsoft.Network/dnsZones/CNAME/*",
"Microsoft.Network/dnsZones/read",
"Microsoft.Authorization/*/read",
"Microsoft.Insights/alertRules/*",
"Microsoft.ResourceHealth/availabilityStatuses/read",
"Microsoft.Resources/deployments/*",
"Microsoft.Resources/subscriptions/resourceGroups/read",
"Microsoft.Support/*"
],
"NotActions": [
],
"AssignableScopes": [
"/subscriptions/ c276fc76-9cd4-44c9-99a7-4fd71546436e"
]
}
Custom role definitions cannot currently be defined via the Azure portal. A custom role based on this role
definition can be created using Azure PowerShell:
The role can then be assigned in the same way as built-in roles, as described earlier in this article.
For more information on how to create, manage, and assign custom roles, see Custom Roles in Azure RBAC.
Resource locks
In addition to RBAC, Azure Resource Manager supports another type of security control, namely the ability to
lock resources. Where RBAC rules allow you to control the actions of specific users and groups, resource locks are
applied to the resource, and are effective across all users and roles. For more information, see Lock resources with
Azure Resource Manager.
There are two types of resource lock: CanNotDelete and ReadOnly. These can be applied either to a DNS zone,
or to an individual record set. The following sections describe several common scenarios, and how to support
them using resource locks.
Protecting against all changes
To prevent any changes being made, apply a ReadOnly lock to the zone. This prevents new record sets from being
created, and existing record sets from being modified or deleted.
Zone level resource locks can be created via the Azure portal. From the DNS zone page, select Locks, then select
+Add:
Zone-level resource locks can also be created via Azure PowerShell:
Configuring Azure resource locks is not currently supported via the Azure CLI.
Protecting individual records
To prevent an existing DNS record set against modification, apply a ReadOnly lock to the record set.
NOTE
Applying a CanNotDelete lock to a record set is not an effective control. It prevents the record set from being deleted, but it
does not prevent it from being modified. Permitted modifications include adding and removing records from the record set,
including removing all records to leave an empty record set. This has the same effect as deleting the record set from a DNS
resolution viewpoint.
Record set level resource locks can currently only be configured using Azure PowerShell. They are not supported
in the Azure portal or Azure CLI.
# Protect against zone delete with CanNotDelete lock on the record set
New-AzResourceLock -LockLevel CanNotDelete -LockName "<lock name>" -ResourceName "<zone name>/@" -
ResourceType" Microsoft.Network/DNSZones/SOA" -ResourceGroupName "<resource group name>"
Another way to prevent accidental zone deletion is by using a custom role to ensure the operator and service
accounts used to manage your zones do not have zone delete permissions. When you do need to delete a zone,
you can enforce a two-step delete, first granting zone delete permissions (at the zone scope, to prevent deleting
the wrong zone) and second to delete the zone.
This second approach has the advantage that it works for all zones accessed by those accounts, without having to
remember to create any locks. It has the disadvantage that any accounts with zone delete permissions, such as the
subscription owner, can still accidentally delete a critical zone.
It is possible to use both approaches - resource locks and custom roles - at the same time, as a defense-in-depth
approach to DNS zone protection.
Next steps
For more information about working with RBAC, see Get started with access management in the Azure portal .
For more information about working with resource locks, see Lock resources with Azure Resource Manager.
Create DNS zones and record sets using the .NET
SDK
1/14/2020 • 6 minutes to read • Edit Online
You can automate operations to create, delete, or update DNS zones, record sets, and records by using the DNS
SDK with the .NET DNS Management library. A full Visual Studio project is available here.
using Microsoft.Rest.Azure.Authentication;
using Microsoft.Azure.Management.Dns;
using Microsoft.Azure.Management.Dns.Models;
Initialize the DNS management client
The DnsManagementClient contains the methods and properties necessary for managing DNS zones and record
sets. The following code logs into the service principal account and creates a DnsManagementClient object.
NOTE
DnsManagementClient supports three modes of operation: synchronous ('CreateOrUpdate'), asynchronous
('CreateOrUpdateAsync'), or asynchronous with access to the HTTP response ('CreateOrUpdateWithHttpMessagesAsync').
You can choose any of these modes, depending on your application needs.
Azure DNS supports optimistic concurrency, called Etags. In this example, specifying "*" for the 'If-None-Match'
header tells Azure DNS to create a DNS zone if one does not already exist. The call fails if a zone with the given
name already exists in the given resource group.
// Create an Azure Resource Manager 'tag'. This is optional. You can add multiple tags
dnsZoneParams.Tags = new Dictionary<string, string>();
dnsZoneParams.Tags.Add("dept", "finance");
// Add records to the record set parameter object. In this case, we'll add a record of type 'A'
recordSetParams.ARecords = new List<ARecord>();
recordSetParams.ARecords.Add(new ARecord("1.2.3.4"));
// Add metadata to the record set. Similar to Azure Resource Manager tags, this is optional and you can add
multiple metadata name/value pairs
recordSetParams.Metadata = new Dictionary<string, string>();
recordSetParams.Metadata.Add("user", "Mary");
// Add a new record to the local object. Note that records in a record set must be unique/distinct
recordSet.ARecords.Add(new ARecord("5.6.7.8"));
Next steps
Download the Azure DNS .NET SDK sample project, which includes further examples on how to use the Azure
DNS .NET SDK, including examples for other DNS record types.
Use Azure DNS to provide custom domain settings
for an Azure service
11/20/2019 • 6 minutes to read • Edit Online
Azure DNS provides DNS for a custom domain for any of your Azure resources that support custom domains or
that have a fully qualified domain name (FQDN ). An example is you have an Azure web app and you want your
users to access it by either using contoso.com, or www.contoso.com as an FQDN. This article walks you through
configuring your Azure service with Azure DNS for using custom domains.
Prerequisites
In order to use Azure DNS for your custom domain, you must first delegate your domain to Azure DNS. Visit
Delegate a domain to Azure DNS for instructions on how to configure your name servers for delegation. Once
your domain is delegated to your Azure DNS zone, you are able to configure the DNS records needed.
You can configure a vanity or custom domain for Azure Function Apps, Public IP addresses, App Service (Web
Apps), Blob storage, and Azure CDN.
Note the current url on the Custom domains blade, this address is used as the alias for the DNS record created.
Navigate to your DNS Zone and click + Record set. Fill out the following information on the Add record set
blade and click OK to create it.
Navigate back to your function app, click Platform features, and under Networking click Custom domains,
then under Custom Hostnames click + Add hostname.
On the Add hostname blade, enter the CNAME record in the hostname text field and click Validate. If the record
is found, the Add hostname button appears. Click Add hostname to add the alias.
Public IP address
To configure a custom domain for services that use a public IP address resource such as Application Gateway, Load
Balancer, Cloud Service, Resource Manager VMs, and, Classic VMs, an A record is used.
Navigate to Networking > Public IP address, select the Public IP resource and click Configuration. Notate the
IP address shown.
Navigate to your DNS Zone and click + Record set. Fill out the following information on the Add record set
blade and click OK to create it.
Navigate to your DNS Zone and click + Record set. Fill out the following information on the Add record set
blade and click OK to create it.
To learn more about mapping a custom domain to App Service, visit Map an existing custom DNS name to Azure
Web Apps.
To learn how to migrate an active DNS name, see Migrate an active DNS name to Azure App Service.
If you need to purchase a custom domain, visit Buy a custom domain name for Azure Web Apps to learn more
about App Service domains.
Blob storage
The following steps take you through configuring a CNAME record for a blob storage account using the asverify
method. This method ensures there is no downtime.
Navigate to Storage > Storage Accounts, select your storage account, and click Custom domain. Notate the
FQDN under step 2, this value is used to create the first CNAME record
Navigate to your DNS Zone and click + Record set. Fill out the following information on the Add record set
blade and click OK to create it.
Navigate back to your storage account by clicking Storage > Storage Accounts, select your storage account and
click Custom domain. Type in the alias you created without the asverify prefix in the text box, check **Use indirect
CNAME validation, and click Save. Once this step is complete, return to your DNS zone and create a CNAME
record without the asverify prefix. After that point, you are safe to delete the CNAME record with the cdnverify
prefix.
Validate DNS resolution by running nslookup
To learn more about mapping a custom domain to a blob storage endpoint visit Configure a custom domain name
for your Blob storage endpoint
Azure CDN
The following steps take you through configuring a CNAME record for a CDN endpoint using the cdnverify
method. This method ensures there is no downtime.
Navigate to Networking > CDN Profiles, select your CDN profile.
Select the endpoint you are working with and click + Custom domain. Note the Endpoint hostname as this
value is the record that the CNAME record points to.
Navigate to your DNS Zone and click + Record set. Fill out the following information on the Add record set
blade and click OK to create it.
Navigate back to your CDN endpoint by clicking Networking > CDN Profiles, and select your CDN profile. Click
+ Custom domain and enter your CNAME record alias without the cdnverify prefix and click Add.
Once this step is complete, return to your DNS zone and create a CNAME record without the cdnverify prefix.
After that point, you are safe to delete the CNAME record with the cdnverify prefix. For more information on CDN
and how to configure a custom domain without the intermediate registration step visit Map Azure CDN content to
a custom domain.
Next steps
Learn how to configure reverse DNS for services hosted in Azure.
Azure DNS troubleshooting guide
11/20/2019 • 4 minutes to read • Edit Online
This article provides troubleshooting information for common Azure DNS questions.
If these steps don't resolve your issue, you can also search for or post your issue on our community support forum
on MSDN. Or, you can open an Azure support request.
Next steps
Learn about Azure DNS zones and records
To start using Azure DNS, learn how to create a DNS zone and create DNS records.
To migrate an existing DNS zone, learn how to import and export a DNS zone file.
Azure CLI examples for Azure DNS
11/20/2019 • 2 minutes to read • Edit Online
The following table includes links to Azure CLI examples for Azure DNS.
Create a DNS zone and record Creates a DNS zone and record for a domain name.
What is Azure Private Link? (Preview)
1/21/2020 • 3 minutes to read • Edit Online
Azure Private Link enables you to access Azure PaaS Services (for example, Azure Storage, Azure Cosmos DB, and
SQL Database) and Azure hosted customer/partner services over a Private Endpoint in your virtual network.
Traffic between your virtual network and the service traverses over the Microsoft backbone network, eliminating
exposure from the public Internet. You can also create your own Private Link Service in your virtual network (VNet)
and deliver it privately to your customers. The setup and consumption experience using Azure Private Link is
consistent across Azure PaaS, customer-owned, and shared partner services.
IMPORTANT
This public preview is provided without a service level agreement and should not be used for production workloads. Certain
features may not be supported, may have constrained capabilities, or may not be available in all Azure locations. See the
Supplemental Terms of Use for Microsoft Azure Previews for details. For known limitations, see Private Endpoint and Private
Link Service.
Key benefits
Azure Private Link provides the following benefits:
Privately access services on the Azure platform: Connect your virtual network to services running in
Azure privately without needing a public IP address at the source or destination. Service providers can
render their services privately in their own virtual network and consumers can access those services
privately in their local virtual network. The Private Link platform will handle the connectivity between the
consumer and services over the Azure backbone network.
On-premises and peered networks: Access services running in Azure from on-premises over
ExpressRoute private peering/VPN tunnels (from on-premises) and peered virtual networks using private
endpoints. There is no need to set up public peering or traverse the internet to reach the service. This ability
provides a secure way to migrate workloads to Azure.
Protection against data exfiltration: With Azure Private Link, the private endpoint in the VNet is mapped
to a specific instance of the customer's PaaS resource as opposed to the entire service. Using the private
endpoint consumers can only connect to the specific resource and not to any other resource in the service.
This in built mechanism provides protection against data exfiltration risks.
Global reach: Connect privately to services running in other regions. This means that the consumer's
virtual network could be in region A and it can connect to services behind Private Link in region B.
Extend to your own services: Leverage the same experience and functionality to render your own service
privately to your consumers in Azure. By placing your service behind a Standard Load Balancer you can
enable it for Private Link. The consumer can then connect directly to your service using a Private Endpoint in
their own VNet. You can manage these connection requests using a simple approval call flow. Azure Private
Link works for consumers and services belonging to different Active Directory tenants as well.
Availability
The following table lists the Private Link services and the regions where they are available.
Private Link for customer- Private Link services behind All public regions Preview
owned services Standard Load Balancer
Private Link for Azure PaaS Azure Storage All public regions Preview
services Learn more.
For the most up-to-date notifications, check the Azure Virtual Network updates page.
Logging and monitoring
Azure Private Link is integrated with Azure Monitor which allows you to archive logs to a storage account, stream
events to your Event Hub, or send them to Azure Monitor logs. You can access the following information on Azure
Monitor:
Private endpoint: Data processed by the Private Endpoint (IN/OUT)
Private Link service:
Data processed by the Private Link service (IN/OUT)
NAT port availability
Pricing
For pricing details, see Azure Private Link pricing.
FAQs
For FAQs, see Azure Private Link FAQs.
Limits
For limits, see Azure Private Link limits.
Next steps
Create a Private Endpoint for SQL Database Server using Portal
Create a Private Endpoint for SQL Database Server using PowerShell
Create a Private Endpoint for SQL Database Server using CLI
Create a Private Endpoint for Storage account using Portal
Create a Private Endpoint for Azure Cosmos account using Portal
Create your own Private Link service using Azure PowerShell
Migrating legacy Azure DNS private zones to new
resource model
11/13/2019 • 4 minutes to read • Edit Online
During public preview, private DNS zones were created using “dnszones” resource with “zoneType” property set to
“Private”. Such zones will not be supported after December 31, 2019 and must be migrated to GA resource model
which makes use of “privateDnsZones” resource type instead of “dnszones”. The migration process is simple, and
we've provided a PowerShell script to automate this process. This guide provides step by step instruction to
migrate your Azure DNS private zones to the new resource model.
To find out the dnszones resources that require migration; execute the below command in Azure CLI.
Prerequisites
Make sure you have installed latest version of Azure PowerShell. For more information on Azure PowerShell (Az)
and how to install it visit https://docs.microsoft.com/powershell/azure/new -azureps-module-az
Make sure that you've Az.PrivateDns module for the Azure PowerShell installed. To install this module, open an
elevated PowerShell window (Administrative mode) and enter following command
IMPORTANT
The migration process is fully automated and isn't expected to cause any downtime. However, if you're using Azure DNS
private zones (preview) in a critical production environment you should execute the following migration process during a
planned maintenance time window. Make sure that you don't modify the configuration or record-sets of a private DNS zones
while you're running the migration script.
install-script PrivateDnsMigrationScript
You can also manually obtain the latest version of PowerShell script at
https://www.powershellgallery.com/packages/PrivateDnsMigrationScript
IMPORTANT
The migration script must not be run in Azure cloud shell and must be executed in a VM or local machine connected to
internet.
PrivateDnsMigrationScript.ps1
If you find that DNS queries aren't resolving, wait for a few minutes and retry the queries. If DNS queries are
working as expected, enter ‘Y’ when script prompts you to remove the virtual network from the private DNS zone.
IMPORTANT
If because of any reason DNS resolution against the migrated zones isn't working as expected, enter ‘N’ in above step and
script will switch the DNS resolution back to legacy zones. Create a support ticket and we can help you with migration of
your DNS zones.
Cleanup
This step will delete the legacy DNS zones and should be executed only after you've verified that DNS resolution is
working as expected. You’ll be prompted to delete each private DNS zone. Enter ‘Y’ at every prompt after verifying
that DNS resolution for that zones is working properly.
Next steps
Learn how to create a private zone in Azure DNS using Azure PowerShell or Azure CLI.
Read about some common private zone scenarios that can be realized with private zones in Azure DNS.
For common questions and answers about private zones in Azure DNS, including specific behavior you can
expect for certain kinds of operations, see Private DNS FAQ.
Learn about DNS zones and records by visiting DNS zones and records overview.
Learn about some of the other key networking capabilities of Azure.