Could not resolve DNS for subdomain

Majda Hadzovic 1 Reputation point
2021-06-05T18:25:18.407+00:00

Hi,

We have public IP address with DNS name something.westus2.cloudapp.azure.com and static IP address. As we are using it for our multisite resource, we need to resolve DNS for our subdomains as well. What we did:

  1. Created DNS zone for parent zone something.westus2.cloudapp.azure.com and A record for it with value of our static IP address
  2. Created separate DNS zone for our subdomain subdomain.something.westus2.cloudapp.azure.com and also A record for it with value of our static IP address
  3. Added NS record on parent zone with subdomain name and value of nameservers from our subdomain zone.

DNS is resolved for our parent zone (it was resolved automatically, before adding any DNS zone for it on our public IP address), but we cannot resolve DNS for our subdomain.

Can you please help us with resolving DNS for our subdomain, to manage that our subdomain is also pointing to our static IP address?

Thank you very much in advance

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
599 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaviVarmanMSFT 626 Reputation points Microsoft Employee
    2021-06-08T13:25:05.193+00:00

    Hi @Majda Hadzovic

    When you update the public IP DNS label, it will create an "A record" that starts with the specified label (to the name you provide to create the fully qualified DNS name) and resolves to the public IP address, it will be registered with the Azure-provided DNS servers. Example: something.westus2.cloudapp.azure.com. You just can inject single label to that DNS suffix and can't add multiple labels like subdomain.

    You need to have an custom domain to achieve this, Azure DNS isn't the domain registrar, Azure DNS currently doesn't support purchasing of domain names. If you want to purchase a domain name, you need to use a third-party domain name registrar. Azure DNS allows you to host a DNS zone and manage the DNS records for a domain in Azure. In order for DNS queries for a domain to reach Azure DNS, the domain has to be delegated to Azure DNS from the parent domain.

    EX: When you have custom domain
    contoso.com as your custom domain, then create an A record for your subdomain "subdomain.contoso.com" and point it to the public IP

    EX: When you have custom domain and manage the records in Azure DNS

    • Purchase contoso.com from third party domain registrar
    • Create contoso.com as DNS zone in Azure
    • In order for DNS queries for contoso.com to reach Azure DNS, the contoso.com has to be delegated to Azure DNS.
      DNS delegation: https://learn.microsoft.com/en-us/azure/dns/dns-domain-delegation
    • Create an Alias record for your domain and A record for your subdomain "subdomain.contoso.com" and point the public IP
      Select your Azure DNS zone to open the zone.
      Select Record set.
      Leave the Name text box empty to represent the domain name apex. An example is contoso.com.
      Leave the Type as an A record.
      Select the Alias Record Set check box.
      Select Choose Azure service, and select the Public IP. Create Record: https://learn.microsoft.com/en-us/azure/dns/dns-operations-recordsets-portal
      • As the zone is delegated and we have records now the domain and subdomain will be resolved publically

    Hope this was helpful. Please let us know in case of any additional questions or concerns.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well

    0 comments No comments