Point Azure Website on Azure VM running IIS WIN 2019 on Custom Domain DNS zone?

Chris06 96 Reputation points
2020-06-15T12:31:40.64+00:00

How do i accomplish this? The azure articles on how to do this are very confusing. It's not clear. I know i need to point an IP in my DNS zones, but can someone explain in lamen's terms which IP needs to be set where? Bindings?

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
690 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,902 questions
{count} votes

1 answer

Sort by: Most helpful
  1. TravisCragg-MSFT 5,681 Reputation points Microsoft Employee
    2020-06-23T21:03:44.293+00:00

    If I am understanding correctly, you have a VM in Azure running a web server, and you would like to configure DNS for a website on that web server.

    Assuming that your VM & website is not also behind an App Gateway or Load Balancer, you will typically access your website via the Public IP of the VM.

    Public IP Addresses typically have a dynamic Public IP address. This means that the IP Address might change if your VM is turned off, or even if Azure experiences an outage. Losing the IP is rare, but it can happen. If this is concerning, you can set the IP to 'Static'.

    Public IP Addresses also have a domain label that you can configure on the Public IP. As a best practice, use a CNAME record pointing to the FQDN of the Public IP when setting DNS entries to Public IP addresses.

    Now that you have your Public IP ready and a domain label set up, you will need to point your custom DNS to the Public IP of your VM. There are 2 ways to do this:

    1) use a CNAME record to point to the FQDN of the Public IP (recommended as a best practice)
    2) use an A record to point to the IP Address of the Public IP. (Make sure your IP Address is static)

    To Point a custom DNS to your Public IP, you will first need to purchase a domain name. You cannot buy your domain name from Azure, you will need to purchase it from a 3rd party DNS provider (like godaddy, ect). Once you have a domain name, you can configure your records to point to your Azure VM.

    To configure the records, you can add / manage the records with your DNS provider, or you can delegate your domain to Azure DNS, to allow you to manage the domain within Azure. Delegating your domain to Azure is not necessary to get your DNS working.

    for the full instructions on how to create a CNAME record, look for guidance with your domain provider if you are managing it there, or if you delegated your domain to Azure DNS, you can find the instructions to add a CNAME here.

    if you need any additional information, please let me know!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.