Azure DNS Registrar and Hosting - What is it and How is it Done?

Description of the image

To buy a website, you must first buy a domain name. For example, if you want to buy “”, the “” is the domain name of the website. Instead of using complex and long IP addresses, you can use a simple alphanumeric name to access the website. A domain registrar is a business from which you can purchase a domain name.

Understanding Domain Registrars

Simply put, a domain registrar, or a DNS registrar, is a person or business that handles domain names and sells them. These businesses assign specific IP addresses to the domains you buy. One thing to note is that when you buy a domain name, you do not permanently buy it. The domain is leased to you for a particular amount of time. Some popular domain name registrars are GoDaddy, DreamHost, BlueHost, etc.

A domain registrar should be accredited by ICANN, Internet Corporation for Assigned Names and Numbers. This corporation maintains an extensive connection of registries. The registrars update the domain names and their new owners in these registries.

Domain registrars ensure that customers' registration of a domain name goes smoothly. They also continuously update domain names so that customers can easily access a wide range of domain names. 

What is the Difference Between a Domain Registrar and a DNS Host?

It is easy to confuse the differences between a domain registrar and a DNS host. In this section, let's examine how registrars and hosts differ and how they work together.

As we saw in the last section, the domain registrar is where you buy your domain names. The DNS host, on the other hand, is a service that translates your domain name into IP addresses. This means the DNS host maintains a registry of all the domain names and associated IP addresses. The translation is done accordingly so that your domain name takes you wherever required on the internet.

DNS hosting is made possible with the help of DNS servers that follow multiple steps to match your domain name with the correct IP address and direct the user to the correct place on the internet.

Azure DNS : Cloud Based Hosting Services 

Azure offers a wide range of cloud solutions and services and also provides DNS services. Azure DNS is a cloud-based hosting service that lets users host and manage their DNS domains and zones. This is advantageous for those who want to link their other Azure services to their domains. 

One thing to be noted is that Azure is not a domain name registrar. You can buy domain names using a third-party registrar, and then use Azure DNS to host and manage your domain(s). You can create private and public zones for your domains in Azure and manage them accordingly.

Hosting your domain with Azure DNS comes with a wide range of advantages. Some of them include:

  • Reliability—Azure DNS ensures that all queries and requests directed to your domain are instantly resolved and answered, making your website reliable.
  • Security - The platform offers advanced features that fortify the infrastructure, ensuring that your domain remains safe.
  • Scalability - If you are a high-traffic business, do not worry! Azure DNS is designed to handle all traffic levels and is easily scalable to match the queries your domain receives.

How to Host Your Domain with Azure DNS?

Hosting your domain with a qualified service is important because it builds trust in your domain name. There are mainly two options for hosting domains - you can either do it with your domain registrar’s hosting services, or you can invest in a high-quality service like Azure DNS.

Here, we describe the steps you need to follow to host your domain with Azure DNS. Ensure you have an active Azure account and a domain you can host.

Creating a DNS Zone

Step 1: Sign in to the Azure portal.

Step 2: Search for the DNS zone in the console, and click on ‘DNS Zones’.

Step 3: Now, create a DNS Zone to host your domain. In the Create DNS Zone, you have to enter the following details:

Name: The name of the domain that you own and want to host.

Subscription: Your Azure subscription.

Resource Group: You can use an existing resource group or create one for your domain.

Step 4: Now all the required details have been submitted, select ‘Create’.

Assigning Name Servers

While setting up a domain in Azure DNS, the platform will automatically assign your domain a name server. To delegate your domain to the host, you need to know about the name servers assigned to your domain. 

Step 1: In the DNS Zone, select the name with your domain. 

Step 2: You will be directed to an Overview page. Here, You can retrieve the name servers. 

Step 3: While Azure assigns its authoritative name servers, you can also update them according to your needs.

Delegating the Domain

Once you have created a DNS zone and updated details in the Azure console, update the new name servers and other details on the parent domain registrar.

Step 1: Visit the domain name registrar’s site. In the DNS management page, update the name server details to assign the Azure DNS name servers.

Step 2: Use all the name servers that were present in the Azure DNS console.

Now, your domain is hosted by Azure DNS services. 

How to Host Your Domain with Azure DNS By CLI?

Step 1: Sign in to Azure

az login

Step 2: Create a Resource Group

az group create --name MyResourceGroup --location eastus

Step 3: Create a DNS Zone

az network dns zone create --resource-group MyResourceGroup --name

Step 4: Add DNS Records

az network dns record-set a add-record --resource-group MyResourceGroup --zone-name --record-set-name www --ipv4-address

Step 5: Retrieve Name Servers

az network dns zone show --resource-group MyResourceGroup --name --query nameServers

Step 6: Update Your Domain Registrar

Step 7: Verify DNS Configuration

dig @<nameserver>

Here is a complete example of the commands:

# Login to Azure
az login

# Create a resource group
az group create --name MyResourceGroup --location eastus

# Create a DNS zone
az network dns zone create --resource-group MyResourceGroup --name

# Add an A record
az network dns record-set a add-record --resource-group MyResourceGroup --zone-name --record-set-name www --ipv4-address

# Retrieve name servers
az network dns zone show --resource-group MyResourceGroup --name --query nameServers

How to Host Your Domain with Azure DNS By Using Terraform?

Step 1: Sign in to Azure

az login

Step 2: Create a Terraform Configuration File


provider "azurerm" {
  features {}

resource "azurerm_resource_group" "example" {
  name     = "MyResourceGroup"
  location = "eastus"

resource "azurerm_dns_zone" "example" {
  name                = ""
  resource_group_name =

resource "azurerm_dns_a_record" "www" {
  name                = "www"
  zone_name           =
  resource_group_name =
  ttl                 = 300
  records             = [""]

Step 3: Initialize Terraform

terraform init

Step 4: Apply the Configuration

terraform apply

Step 5: Retrieve Name Servers

terraform show -json | jq -r '.values.root_module.resources[] | select(.type=="azurerm_dns_zone") | .values.name_servers[]'

Step 6: Update Your Domain Registrar

Want to Learn About Terraform?

The Bottom Line

A domain registrar is a business from which you can get a domain. Although you cannot buy a domain name permanently, you can lease it for a long time. Azure is not a domain registrar, but Azure DNS can be used to host your domains. Using Azure DNS services to host your domain, you can enjoy a wide range of benefits like ease of use, security, and reliability. 

Frequently Asked Questions

Question: Can Azure be a domain registrar?

Answer: Right now Azure does not support any option to buy a domain.

Question: What is the difference between DNS and Azure DNS?

Answer: DNS is a globally distributed system that resolves domain names into IP addresses and Azure DNS allows users to manage DNS records using the Azure portal, Azure CLI, PowerShell, and REST APIs.

Read More

Follow us on

Table of Contents

    Subscribe to Us

    Always Get Notified