How to configure Azure DNS to host your domain


Configuring Azure DNS to Host Your Domain

Hosting your domain in Azure DNS involves several steps, from creating a DNS zone in Azure to updating your domain registrar's name servers.

Here's a detailed guide to help you through the process.

Prerequisites

  1. Domain Name: Ensure you already own a domain name registered with a domain registrar (e.g., GoDaddy, Namecheap).

  2. Azure Subscription: You need an active Azure subscription to create and manage DNS zones.

Steps to Configure Azure DNS for Hosting Your Domain

Step 1: Create a DNS Zone in Azure

  1. Login to Azure Portal:

  2. Navigate to DNS Zones:

    • In the search bar, type DNS Zones and select the service.

  3. Create a New DNS Zone:

    • Click on + Create.

    • Fill in the required details:

      • Subscription: Select your Azure subscription.

      • Resource Group: Choose an existing resource group or create a new one.

      • Name: Enter your domain name (e.g., example.com).

    • Click Review + Create and then Create.

  4. Azure DNS Zone Created:

    • Once created, Azure assigns a set of authoritative name servers (e.g., ns1-01.azure-dns.com) for your DNS zone.

Step 2: Add DNS Records

Now, add the required DNS records to map your domain name to specific resources (e.g., a website, email service).

  1. Go to Your DNS Zone:

    • Select the newly created DNS zone.

  2. Add a DNS Record:

    • Click + Record Set to create a new DNS record.

    • Configure the following:

      • Name: The subdomain (leave blank for the root domain).

      • Type: Select the DNS record type (e.g., A, CNAME, MX).

      • TTL: Time-to-live, in seconds (default is 3600 seconds).

      • Value: The value depends on the record type (e.g., IP address for A records).

    • Click OK to save the record.

  3. Common DNS Records:

    • A Record:

      • Name: www

      • Type: A

      • TTL: 3600

      • Value: Your web server's public IP address (e.g., 192.168.1.1).

    • CNAME Record:

      • Name: blog

      • Type: CNAME

      • TTL: 3600

      • Value: www.example.com (or another domain name).

    • MX Record:

      • Name: (leave blank for root domain).

      • Type: MX

      • TTL: 3600

      • Value: mail.example.com with priority 10.

Step 3: Update Domain Registrar's Name Servers

To make Azure DNS authoritative for your domain, you need to update your domain registrar's settings.

  1. Copy Azure DNS Name Servers:

    • In the Azure Portal, go to the DNS Zone.

    • Note the NS (Name Server) records provided by Azure (e.g., ns1-01.azure-dns.com).

  2. Login to Your Domain Registrar:

    • Access your domain registrar’s control panel.

  3. Edit Name Server Settings:

    • Find the section to manage your domain's name servers.

    • Replace the existing name servers with Azure's name servers. Example:

  1. Save Changes:

    • Save the updated name servers.

    • Note: It may take up to 48 hours for the changes to propagate globally.

Step 4: Verify DNS Configuration

Once the changes propagate, verify that your domain is resolving correctly:

  1. Using nslookup (Command Line):

    • Run the following command:

    • Ensure the returned IP address matches the one configured in your DNS zone.

  2. Online Tools:

    • Use DNS lookup tools like:

      • MXToolbox

      • Google Dig Tool

Step 5: Test Your Domain

Open a browser and navigate to your domain (e.g., www.example.com) to ensure it resolves correctly.

If hosting email services, send a test email to verify that MX records are working.

Example Configuration

Domain: example.com

Record TypeNameValueTTL
A@ (root domain)192.168.1.13600
Awww192.168.1.13600
CNAMEblogwww.example.com3600
MX@ (root domain)mail.example.com (priority 10)3600
TXT@ (root domain)v=spf1 include:mail.example.com ~all3600
    

Troubleshooting

1. DNS Not Propagating

  • Check if you updated all name server records at your domain registrar.

  • Wait for the DNS propagation period (up to 48 hours).

2. Incorrect DNS Resolution

  • Verify your DNS records in Azure Portal.

  • Use tools like nslookup or dig to confirm that your DNS records match the expected values.

3. Domain Registrar Issues

  • Ensure your domain's registration is active and not expired.

Benefits of Hosting Your Domain in Azure DNS

  • Global Reliability: Fast and highly available name resolution using Microsoft’s infrastructure.

  • Centralized Management: Manage DNS alongside other Azure resources.

  • Scalability: Easily handle millions of DNS queries per second.

  • Security: Leverage Azure's built-in security features like Role-Based Access Control (RBAC) and DDoS protection.

Summary

By following these steps, you can successfully host your domain in Azure DNS, ensuring seamless connectivity and performance for your applications and services. Let me know in comments, if you'd like to know with any specific step.

 

Related Articles


Rajnish, MCT

Leave a Reply

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


SUBSCRIBE

My newsletter for exclusive content and offers. Type email and hit Enter.

No spam ever. Unsubscribe anytime.
Read the Privacy Policy.