Azure DNS in Microsoft Azure

Azure DNS – What is DNS and How to Create Azure DNS Zone and Record Sets

Azure DNS is one of the useful and good cloud services that Microsoft offers to its users. With Azure DNS, users especially web admins or Azure administrators can use it to host websites, manage DNS Zones and records  of website domain’s DNS. Applications, APIs, and cloud services already hosted in the cloud, like Microsoft Azure can make use of Azure DNS for hosting. All in one place and resource group. This gives the advantage of better management of services.  

Importance of DNS (Domain Name System)

Did you know that in every website address or URL you type on your web browser, there is public IP address and DNS (Domain Name System) behind it? 

I remember back in the end of 90’s – 2000’s when I was studying Computer Science in the Philippines, I was fascinated learning about the World Wide Web. It was pretty new back then, now it is the Internet that is a normal thing part of our lives and daily routine. Without it, it could have been different. 

Back in those good old days, I had to write HTML-syntax code to create web pages without an IDE, just notepads. There weren’t any fancy CSS nor Javascript frameworks neither. You had check every line of code to find where you missed some and wrote a wrong HTML syntax. In the old times, everything was simple. Simple websites, maybe looks boring, but creating one was so cool in those good old days. I wrote and published my first simple HTML web pages to be hosted at Lycos, which was pretty popular as search engine and web hosting in the late 90’s.

Azure DNS log0

The First Website was created in 1992

Tim Berners-Lee was the man I cannot forget learning about when I was studying computer science. Who is he? He is the great mind and man behind the creation of the WWW or the World Wide Web in March 1989. That was like 32 years ago! Can you imagine how our world and digitalization would be without the invention of the Internet? I was personally fascinated of it that studying and conducting a local community survey about it was my first thesis in college! I wish I still have those papers. 

In 1992, the first simple website on the web was created. It was plain and simple, but it marked our history and it still exists. You may visit it through this link: http://info.cern.ch/hypertext/WWW/TheProject.html

The first website written in 1992

World Wide Web and the Internet 

On Christmas day of 1990, Berners-Lee created the first successful communication between an HTTP client and a server. From there he designed and built the first Web browser, and the first Web page went live on August 6, 1991. While Berners-Lee is credited for the invention of the World Wide Web, he did not invent the Internet. The two are not one and the same. The Internet is a network of computer networks that spans the globe. It is the hardware and software that provides connections between multiple computers. The World Wide Web is just a service of the Internet. It's a bunch of interconnected documents and resources and their specific locations (via hyperlinks and URLs) online.

DNS – Domain Name System Explained in a Video 

Azure DNS for Cloud Hosting

If you own or administrate a domain or website, it is pretty normal that you are familiar that setting up the DNS Zone settings and records in website domains. In every website that we visit, there is a public IP address behind it which is also called DNS (Domain Name Server). In the world of internet where we are all relying on these days, DNS technology have an important role. 

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.

Creating a DNS Zone in Azure

A DNS zone is used to host the DNS records for a particular website domain.
For example, my website “jonahandersson.tech” contains some of DNS records for my mail server and for my website. So, if I were to host my existing domain in Azure, I would need to make use of the Azure DNS service.  The service would allow me to host my DNS zone and manage my DNS records, and provides name servers. The name services are used for DNS queries.

To create a DNS Zone in Azure, you would need to be an Azure Admin or Azure User with valid subscription. Create a new resource and search for DNS Zone. Select the right Azure Subscription, Resource Group and for the Instance Details, you would need to choose and fill in the desired DNS Zone name like my example below and set up your resource location.

 

CreateDNSZoneAzure
Create a DNS Zone resource on Azure Portal
The DNS Zone shows the DNS information like name services and records after its creation

Creating A-Record and DNS Record Sets

When the DNS zone was created, some DNS record sets are also necessary to be added.  Especially the first and primary record set for the DNS, A-record.

A-record is the primary record to be create first.  

So what is A-record? 

A-record is the record contains the pairing between the IP address and the domain name. It can have more than one entries usually known as record sets. In record sets, the domain name remains constant, while the IP addresses are different. Learn more about DNS Record and Aliases.

Verifying Azure DNS Zone Configuration

In my example above, I do not have the real domain like www.wideworldimportsjonahandersson.com yet, but I could create the DNS Zone in Azure to start with as a demo and learning example. 

In practical and real life situation,  you would need to update the NS (Name Server) records of the domain-name registrar, to delegate the domain to Azure after you created a DNS Record. 

So, even without any registered domain name officially registered yet, it is possible to if you did your Azure DNS configuration correctly.  One of the ways to verify it is using the NSLookup tool directly using the command line tool in the cloud like Azure CLI on Azure Portal. 

Using the nslookup command below with your DNS Zone name and one of your Name Servers, you will be able to verify if your configuration for the Azure DNS zone was correct. You should be getting back the IP address you set up when you started. 

				
					nslookup www.nameofyourazurednszonhere.com <name one of your DNS server address>
				
			
Azure DNS Verification with NSLookup

Adding Alias Record Set for Public IP

After adding the A-record, you would also need to add an Alias record for your public IP. This is necessary so that you can access your DNS over the Internet on any web browser. 

Assuming that you have an existing application hosted already in Azure with an Azure Virtual Machine with NICs , VNet, an assigned public IP adress, you can associate that public IP address in your new Alias record set in your DNS Zone settings. 

To add a new record set, click add Record Set + and complete the necessary information like the example below. 

Create another record set for public IP with Alias Type Resource
Check your existing Public IP address for your application hosted in a VM (Example)
Access the application using the DNS IP Address that was set as a DNS alias

Learning Resources

About Author:  Jonah Andersson is a Filipina-Swedish Software Developer who codes fullstack system development in C# .NET/NET Core. She currently works as a Software Developer Consultant at Forefront Consulting in Sweden. Jonah is passionate about learning, developing and sharing knowledge about Microsoft Azure cloud technologies. A woman who code advocating gender equality in the tech industry through mentorship and by being role model. She also loves creative technical writing her experience. 

Check out Jonah's other Recent Blog Posts

Share the knowledge

1 thought on “Azure DNS – What is DNS and How to Create Azure DNS Zone and Record Sets”

  1. Hi, if I add a Zone in Azure DNS does other Organizations which use Microsoft 365 (example with Exchange Online) use the Azure Nameserver? I ask because if I add a domain can they send me emails if no DNS records are set in the new zone directly? Or will ExOn use the previous DNS Server which are still active ?

Leave a Comment

Your email address will not be published. Required fields are marked *