FQDN on Ubuntu server on Azure

Sean Taylor 0 Reputation points
2023-07-10T20:29:47.65+00:00

I have a webserver running php for a contact page. The page should send an email to one address in my domain, however I can see in the maillogs (sendmail) that all outbound mail is being sent from a random domain of

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,625 questions
{count} votes

1 answer

Sort by: Most helpful
  1. GitaraniSharma-MSFT 49,726 Reputation points Microsoft Employee
    2023-07-11T12:31:44.9066667+00:00

    Hello @Sean Taylor ,

    Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.

    I understand that you would like to set a FQDN on your Azure Ubuntu VM.

    Since you mentioned, you can see a random domain of <loadsoftext>.ax.internal.cloudapp.net, this is the internal DNS suffix provided by Azure DHCP.

    When you're using Azure-provided name resolution, Azure Dynamic Host Configuration Protocol (DHCP) provides an internal DNS suffix (.internal.cloudapp.net) to each VM. This suffix enables host name resolution because the host name records are in the internal.cloudapp.net zone. When you're using your own name resolution solution, this suffix isn't supplied to VMs because it interferes with other DNS architectures (like domain-joined scenarios). Instead, Azure provides a nonfunctioning placeholder (reddog.microsoft.com).

    Also, Azure-managed reverse DNS (PTR) records of form [vmname].internal.cloudapp.net are automatically added to when you start a VM, and removed when the VM is stopped (deallocated).

    The internal.cloudapp.net reverse DNS zone is Azure-managed and can't be directly viewed or edited. Forward lookup on the FQDN of form [vmname].internal.cloudapp.net resolves to the IP address assigned to the virtual machine.

    Refer: https://learn.microsoft.com/en-us/azure/virtual-network/virtual-networks-name-resolution-for-vms-and-role-instances?tabs=redhat#vms-and-role-instances

    https://learn.microsoft.com/en-us/azure/virtual-network/virtual-networks-name-resolution-for-vms-and-role-instances?tabs=redhat#reverse-dns-considerations

    Could you please let me know if you are using a Classic VM or ARM VM?

    If you are using an ARM VM, then you could follow the below docs to add a FQDN or custom domain:

    https://learn.microsoft.com/en-us/azure/virtual-machines/create-fqdn

    https://learn.microsoft.com/en-us/azure/virtual-machines/custom-domain

    If you are using Classic VM, then it is recommended to migrate your IaaS resources to Azure Resource Manager by September 1, 2023, as Classic resources are retiring on September 1, 2023.

    Refer: https://learn.microsoft.com/en-us/azure/virtual-machines/classic-vm-deprecation

    If you are using Azure Cloud service, then you could follow the below docs:

    https://learn.microsoft.com/en-us/azure/cloud-services/cloud-services-connectivity-and-networking-faq#how-can-i-redirect-incoming-traffic-to-the-default-url-of-my-cloud-service-to-a-custom-url-

    https://learn.microsoft.com/en-us/azure/cloud-services/cloud-services-custom-domain-name-portal

    In case your requirement is different, please share additional details for further discussion on same.

    Kindly let us know if the above helps or you need further assistance on this issue.


    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    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.