Configuring a sub-domain DNS in Azure.

Singh1, Ajay 1 Reputation point
2020-06-24T06:25:36.513+00:00

I am new to Azure. I have a linux vm hosted in Azure, on which I am running a springboot application. The springboot app runs behind an Apache httpd.

DNS name for the host is something like xyz.westus.cloudapp.azure.com (provided by Azure) and i need to create a sub domain (abc.xyz.cloudapp.azure.com) to host few files on my server. I have made following configuration in the httpd conf to route the requests for sub domain

<VirtualHost *:443>
    **ServerName abc.xyz.westus.cloudapp.azure.com
    ServerAlias xyz.westus.cloudapp.azure.com
    DocumentRoot /var/pathforsubdomainfiles**
    .......................
    enter code here....................
</VirtualHost>

I am not able to figure out how to create a DNS record for the new subdomain (abc.xyz.westus.cloudapp.azure.com) in Azure so that it could be resolved over a public network to access the hosted files. I do not have any DNS zones created in Azure yet. Is it possible to create a DNS zone for AZURE provided DNS and then create another DNS zone for the subdomain and add it to DNS zone for parent DNS.

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

1 answer

Sort by: Most helpful
  1. TravisCragg-MSFT 5,681 Reputation points Microsoft Employee
    2020-07-08T01:02:43.043+00:00

    what you are referring to is the domain label of a public IP address. You will not be able to add any records or configure this in any way.

    As a best practice, you should get a domain name and point it to the domain label using a CNAME record. Then you will be able to add records for subdomains.

    0 comments No comments