So I purchased a domain via azure DNS. Lets say foo.com
. Prior to this I have created and bought up my linux VM. Its ubuntu 17.04 server. I can see a provision to configure DNS for the VM. However, instead of foo.com
, which is what I want, I get foo.<region>.cloudapp.azure.com
.
I don't see a way to associate my dns name to the running vm instance.
You may want to create an A record that points to the public IP address of the VM. Let's say you'd want to host a website, you could create an A record pointing www.foo.com to the public IP address of the VM. This would require a static public IP address though. You mentioned you are using Azure DNS - you may want to check here (if you haven't already): https://docs.microsoft.com/en-us/azure/dns/dns-getstarted-portal
Alternatively, you could also use a CNAME record to point foo.com or any other URL to your VM. The advantage would be that you would not need a static IP but could point your CNAME entry to the FQDN you can define in the portal. This article is for classic Service Manager deployments in Azure but the idea is the same: https://docs.microsoft.com/en-us/azure/cloud-services/cloud-services-custom-domain-name-portal
Hope this helps.
You are right, Azure is not a domain registrar, we can't buy domain name from it.
If you want to create a FQDN for this Linux VM, we can create DNS name in Public IP address configuration:
If you buy a domain name from other domain registrar, we should add A record to Azure VM's public IP address, for example, buy a domain name from
register.com
, we should add A record like this:Here a similar case, please refer to it.