Understand and Configure Public DNS Zone for Hosting your Domain in Azure


Want to understand and implement Azure DNS and host your domain name in Azure? Well Azure DNS let’s you do exactly that. With Azure DNS, you can host your domain in Azure and you can manage it as you would do with other Azure Services.

What is DNS?

Before we begin with Azure DNS, let us try to understand What is DNS?

DNS stands for Domain Name System. Basically, it is a protocol within the TCP/IP standard. It plays a pivotal role of translating the domain names into an IP address.

As a human, we would not remember the IP addresses to reach a website. We would, therefore, type in the address, which are usually words in English literals, preceded by www and ending with .com for example, whereas, the computers would require the IP addresses to identify and route the requests to the destination.

It is a must for a computer, server, or other network-enabled device to refer a DNS server if the access request is made for any web-based resources. DNS plays that role to translate the domain name into IP address and then route the requests to the destination. Under the hood, DNS actually uses the global catalogue or the directory that is hosted on multiple servers around  the globe

How Does DNS Work?

There are two primary functions that the DNS server performs:

  • In it’s cache, it maintains a local copy of recently accessed domain names and their IP addresses
  • It  also maintains the key-value pair database of IP addresses and any host or subdomain that it has authority over

So it checks to see if the domain is stored in the short term cache. If  the first condition is met,  the DNS server resolves the request and by responding with the results. The short term cache provides a faster response to a local domain lookup request.

If the DNS server can’t find the requested domain, it passes the request to another DNS server. This is a repetitive process until either a match is made for the host name, or the search times out and it responds with error – Domain name not found.

DNS Record Types

Now that we understand what is DNS and how it works, let us try to understand the types of records maintained by DNS that is used  to determine the route to the destination for a particular host/subdomain that this  DNS  server  maintains.

The first one is the A record. This is called the host record, and is the most common type of DNS record. In this record type, we map the domain or host name to the IP address.

We then have the CNAME record type. CANAME stands for Canonical Name record and is used to create an alias for the domain name. You can also say an alias from one domain name to another domain name. For example, a website can have more than domain names If you hade different domain names accessing the same website, you would use CNAME records to map the alias.

The third one is the MX record type. This is for the mail exchange record. It maps the incoming mail requests to the specified mail server, whether hosted on-premises or in the cloud.

Next one is the TXT record type, which is the text record. It is associated with the domain names to verify the domain ownership. Azure and Microsoft 365 uses the TXT records to verify domain ownership whenever we try to map the domain with any Azure Service like – App Service, Azure AD Domain, etc.

We also have a few other record types that exists. They are –

Out of these, SOA and Name Server records are automatically created when we create the DNS Zone using Azure DNS.

There may be instances, that there are different resources mapped to a single record. For example, we can have one domain mapped to two different IP addresses. This cannot be done with CNAME and SOA record types.

What is Azure DNS?

Whatever we have discussed thus far is true for Azure DNS as well and works in a similar fashion and is used for the same purpose of mapping the domain to the resources and managing the domain right from inside Azure. You can host your domain and manage in the same way as you would manage other resources in Azure.

Although, Azure DNS acts as a start of authority for your domain, it cannot be used for domain name registration though. For that you need to use a third party domain registrar

Security features

Azure DNS provides Role-based access control, allowing you to have a fine-grained control over users’ access. Then we have the Activity logs that let’s you track changes to a resource, and pinpoint where faults occurred. We also have Resource locking, providing greater control to restrict access to resources.

Ease of use

Azure DNS is easy to configure, use, and manage. You can use it to manage DNS records for your Azure services, and also for external resources as well. One interesting thing is that you can manage records and domains using the Azure portal, PowerShell cmdlets, and the Azure CLI  as well.

Private domains

With Azure DNS you can create private zones as well. Although, Private DNS Zone is out of scope of this  session, but just to give you an idea, private zones provide name resolution for virtual machines (VMs) within and between virtual networks, without having to create a custom DNS solution. You can use your own custom domain names rather than the Azure-provided names.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: