Azure DNS is one of the useful and good cloud services that Microsoft offers to its users. With Azure DNS, users especially web or Azure administrators can use it to host websites, manage DNS zones and records for your 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.
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.
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 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 marks our history and it still exists. You may visit it through this link: http://info.cern.ch/hypertext/WWW/TheProject.html
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. - Business Insider
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. - Microsoft Documentation for Azure DNS
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.
Create a DNS Zone resource on Azure Portal
The DNS Zone shows the DNS information like name services and records after its creation
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.
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.
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
Access the application using the DNS IP Address that was set as a DNS alias
- What is Azure DNS?
- Azure DNS Documentation by Microsoft
- Azure DNS YouTube Video by Intellipat – Azure DNS | What is DNS Server | How DNS Server works
I hope you learned something and interested to learn more.
If you like this article, please re-share the knowledge!
Feel free to leave feedback and ask questions.
Jonah Andersson is a Filipina-Swedish Software Developer who codes full stack system development in C# .NET/NET Core. She currently works as a Software Developer Consultant at Forefront Consulting in Sweden. Jonah is passionate about continuous learning, developing and sharing knowledge about Microsoft Azure cloud technologies. She one of the #AzureHeroes in Sweden. A woman who codes in tech who enjoys writing, advocating gender equality in the tech industry through mentorship and by being role model on her spare time.
NOTE: This article was originally and first published on my website https://jonahandersson.tech