问题
I have an Azure Virtual Machine which has myvmname.northeurope.cloudapp.azure.com
set as a DNS name. I want it to be something like somename.my.domain.com
. I am an owner of my.domain.com
. How do I change it on the portal for the VM? Did I get stuck with default provided one? Docs are not clear for VMs.
回答1:
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.
You also could select to host your domain in Azure DNS, then you can manage your DNS records on Azure portal. See this blog for more details.
来源:https://stackoverflow.com/questions/62183580/how-to-set-a-custom-domain-for-azure-virtual-machine