Binding custom domain for Azure Virtual Machine?

693 Views Asked by At

I want to bind my custom domain to my Azure VM.

The DNS name of my networking is, for example, xxx.westus2.cloudapp.azure.com (here I use xxx to replace my real DNS name label)

I have followed the answer from this link: https://stackoverflow.com/a/62185398

Azure VM has a default FQDN that you only could change the DNS label. If you want to add your own custom domain for that Azure VM, you could add a CNAME type DNS record like somename.my.domain.com CNAME myvmname.northeurope.cloudapp.azure.com or A type record like somename.my.domain.com A your Azure VM public IP address in your DNS domain my.domain.com provider.

But when I click my custom domain, it directs me to the following weblink. This is the same link when I click my public IP from AZURE. How can I make my custom domain directs to my xxx.westus2.cloudapp.azure.com?

Thanks for your help.

enter image description here

1

There are 1 best solutions below

11
On

To allow the website on your Azure VM to be accessed with a custom domain, you can add A or CNAME records in your DNS provider to map the public IP address or FQDN of Azure VM.

For example, you want to access www.contoso.com, you can add CNAME record www in the contoso.com zone.

www CNAME xxx.westus2.cloudapp.azure.com

It usually takes a few hours to wait for DNS propagation worldwide. You can verify it via this website https://www.whatsmydns.net/.

Let me know if you have any concerns.