Score:0

Configure Domain name to Virtual Machine - Azure

cn flag

I have a virtual machine in my Azure subscription running Windows Server, having a public ip address on a specific port (https://ipaddress:port). This ip address is linked to a website in the Windows Server

I also purchased a domain name and a ssl certificate from Azure as well.

How can I link the domain name to the virtual machine ip address ?

So, instead of typing the ipaddress with the port. I can just use the domain name.

Note: I am new to Azure.

Score:0
ru flag

So you have to follow below steps:

  1. Create DNS Zone with your Domain which you already purchased from Azure. If you have already purchased domain from azure may be DNS Zone was created automatically with your Domain Name. https://docs.microsoft.com/en-us/azure/dns/dns-operations-dnszones-portal
  2. Then you have to just create A Record in DNS Zone and adding your VM IP Address and Domain Name. https://docs.microsoft.com/en-us/azure/dns/dns-getstarted-portal
  3. Now you have to bind your website with your domain at the IIS of somewhere where you have hosted.
Score:0
cn flag

Firstly, I recommend you do not link a public name to the actual VM's IP. Public names are generally linked to web sites or other endpoints on a host. By linking a public name to a machine IP, you're simply inviting malicious actors to try and crack the machine and/or fill it with malware.

However, if you want to configure different names for apps/services, presumably you bought the domain via the Azure App Service. Hopefully you didn't link it to a specific web app - if you did, you probably have to undo it.

What you need to do is configure a custom DNS record (an A record for your host). To do that, you set up a zone in Azure DNS - or a third party DNS, but I suspect that's over-complicated for your needs - and then configure the records in there to point to your host. There's a small cost for setting up an Azure DNS instance, naturally.

To continue my initial warning, from a security-by-obscurity point of view (as limited as that is), it's preferable to just manage the machine via its IP address. You can always edit a hosts file on the machine you're connecting from and provide a name for the IP there for convenience. Obviously I'm assuming you're an individual managing just one or two machines. In an enterprise environment, it'd be very different.

If you'll be managing multiple machines, it might be worth considering Azure Bastion as a more secure solution. Of course, there's an additional cost for that too.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.