Creating DNS Zones and Changing Name Servers from Public DNS

Introduction

Domain Name System (DNS) is the internet's phonebook, translating human-readable domain names into IP addresses that computers use to identify each other on the network. DNS zones host a domain's DNS records, and changing your name servers to Azure DNS allows you to manage your domain's DNS records from your Azure account.

Individuals typically turn to domain name registrars, authorized entities responsible for reserving and managing domain names for a fee to secure a domain name. These registrars offer various services necessary for maintaining a domain. Popular registrars include GoDaddy, WordPress, and OnlyDomains, with numerous options available in the market.

Azure DNS Zones are a vital service offered within the Microsoft Azure Portal. They facilitate mapping your public domains to Azure DNS Zones and web servers, allowing for the seamless publication of web apps via DNS Zones.

Microsoft Azure

Within Azure, there are two primary types of DNS Zones services.

  1. DNS Zone: This service operates over the internet and resolves names globally. It's essential for hosting domains in Azure, and we will delve into its specifics shortly.
  2. Private DNS Zones: This service operates without requiring internet connectivity. Typically utilized within intranets over Virtual Networks, it doesn't necessitate a public domain.

Step 1. Go to the Azure Portal at (https://portal.azure.com/).

Domain

Step 2. To find DNS Zones, just type "DNS Zones" into the search bar located at the top of the Azure portal interface.

Azure portal interface

Step 3. Once open the DNS zones section, Click on Create.

Create DNS

Step 4. Fill in the Name with your domain (e.g., sifadhussain.info) and select your subscription and resource group, then click on Review Create.

Review Create

Validation passed; then click on Create.

Validation passed

Step 5. Once the DNS zone is created, click on Go to the resource.

Resource

After creating the zone, take note of the Name Servers responsible for hosting the records within your zone. You will need to update the Name Servers with your domain registrar. These servers usually have names like.

Name Servers

Step 6. I utilized GoDaddy to register my domain, which is the screen I utilized to modify the Name Server records. Other registrars offer similar capabilities.

Access the Nameservers section and proceed to change the nameservers to Azure DNS.

DNS Management

Choose your nameserver and input all the name servers identified during the DNS zone creation step. Then, save the changes.

Save

It may take up to 48 hours for the changes to propagate worldwide. You can use tools like nslookup or dig to verify that your domain's DNS records resolve to the values specified in Azure DNS.

Launch PowerShell and execute the following command.

nslookup sifadhussain.info ns1-38.azure-dns.com

You should receive a response containing your name and the public IP address of your web app.

IP address

Step 7. To test the web server, I have set up a basic page on Azure displaying Azure DNS Zones. However, accessing it via the public IP address doesn't reflect the desired setup. We aim to access it using the domain name sifadhussain.info we created. To achieve this, we must add a record set in the DNS Zone.

Azure DNS

Step 8. Within the Azure DNS Zone interface, proceed to create a new Recordset, specifying the Type A record type, and input the IP address of your web server to enable domain resolution, then click on Ok.

Web server

After confirming the details and clicking OK, the record set will be created, and you will observe the entry in the DNS Zone interface as highlighted below.

DNS Zone

Step 9. Next, let's proceed to test with the domain name sifadhussain.info that we have set up. The expected outcome should match what we observed with the IP address.

Sifadhussain.info

Conclusion

Managing DNS zones and name servers is crucial for maintaining an efficient online presence. Azure DNS Zones, integrated within the Microsoft Azure Portal, offer a seamless solution for mapping domains and web servers, streamlining the publication of web apps.

Throughout this article, we have explored the fundamentals of DNS zones, creating and configuring them within Azure, and the essential steps for linking them with domain registrars like GoDaddy. Following the outlined steps, users can effectively leverage Azure DNS to optimize their domain management and ensure smooth DNS resolution.

I hope this article is a valuable resource for those seeking to enhance their understanding of DNS management in the Azure environment and facilitate the seamless integration of Azure services into their online infrastructure.