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.
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
World Wide Web and the Internet
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.
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.
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.
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.
- What is Azure DNS? https://docs.microsoft.com/en-us/azure/dns/dns-overview
- Azure DNS Documentation by Microsoft https://docs.microsoft.com/en-us/azure/dns/
- Azure DNS YouTube Video b Intellipat – Azure DNS | What is DNS Server | How DNS Server works
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.