How to create a PTR record?

Santiago Forero 1 Reputation point

Hello, I have a VM on azure with a static IP address and a domain.

I need to make a PTR record that points my VM's address to my domain (

How do I do it?

I have created a DNS Zone like this:
Should I do anything else?

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
631 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. GitaraniSharma-MSFT 49,386 Reputation points Microsoft Employee

    Hello @Santiago Forero ,

    The below doc explains how to host reverse DNS lookup zones in Azure DNS which means you can host reverse DNS lookup zones for your ISP-assigned IP blocks on Azure DNS.

    But if your requirement is to configure reverse DNS (PTR records) for services hosted in Azure (compute resources such as virtual machines, virtual machine scale sets, and Service Fabric clusters having Public IP addresses), then you need to refer the below article:

    Services in Azure use IP addresses assigned by Azure and owned by Microsoft. These reverse DNS records (PTR records) must be created in the corresponding Microsoft-owned reverse DNS lookup zones.

    As explained in this doc, Azure only allows the creation of a reverse DNS record where domain name specified in the reverse DNS record is the same as, or resolves to, the DNS name or IP address of a PublicIpAddress or Cloud Service in the same Azure subscription.

    For example: Suppose the PublicIpAddress resource has the DNS name and IP address The ReverseFqdn for the PublicIpAddress can be specified as:

    • The DNS name for the PublicIpAddress,
    • The DNS name for a different PublicIpAddress in the same subscription, such as
    • A vanity DNS name or a custom DNS name, such as, so long as this name is first configured as a CNAME to, or to a different PublicIpAddress in the same subscription.
    • A vanity DNS name or a custom DNS name, such as, so long as this name is first configured as an A record to the IP address, or to the IP address of a different PublicIpAddress in the same subscription.

    You can configure reverse DNS for PublicIpAddress resources in the Resource Manager deployment model, using either Azure PowerShell, Azure classic CLI, or Azure CLI. Configuring reverse DNS for PublicIpAddress resources is not currently supported via the Azure portal.

    To add reverse DNS to an existing PublicIpAddress, you need to make sure that the Public IP address has a DNS name.

    Detailed steps:

    I have a custom domain "" and wanted to use this domain to setup as a reverse DNS for my Azure VM's static Public IP, so below are the detailed steps that I followed in my own lab to configure a custom reverse DNS and you can refer the same:

    1) First add a DNS label for the Public IP address for which you want to create a PTR record. You can do this either via Azure portal or using the PowerShell commands:


    2) Once the DNS name of the Public IP address is configured and replicated, you will have to go to your DNS provider where your custom domain is and create an A record for the custom DNS to point to the Public IP address or a CNAME record pointing to the Public IP’s DNS name as below:


    3) Once the A record or CNAME record is configured & replicated, you can go ahead and set Reverse DNS as follows using the below Azure PowerShell commands:

    $pip = Get-AzPublicIpAddress -Name "VM2PublicIP" -ResourceGroupName "Training-Lab"
    $pip.DnsSettings.ReverseFqdn = ""
    Set-AzPublicIpAddress -PublicIpAddress $pip

    It should execute successfully and give the following output:

    Name : vm2publicip
    ResourceGroupName : Training-Lab
    Location : eastus
    ProvisioningState : Succeeded
    Tags :
    PublicIpAllocationMethod : Static
    IpAddress :
    PublicIpAddressVersion : IPv4
    IdleTimeoutInMinutes : 4
    IpConfiguration : {
    "Id": "/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/Training-Lab/providers/Microsoft.Network/networkInterfaces/vm2269/ipConfigurations/ipconfig1"
    DnsSettings : {
    "DomainNameLabel": "msazurelabs",
    "Fqdn": "",
    "ReverseFqdn": ""

    Zones : {}
    Sku : {
    "Name": "Basic",
    "Tier": "Regional"
    IpTags : []
    ExtendedLocation : null

    NOTE: It may take some time to replicate the settings and then you can verify the same using Digwebinterface as below.


    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.

    6 people found this answer helpful.

  2. Andreas Baumgarten 103.5K Reputation points MVP

    Hi @Santiago Forero ,

    you created a reverse lookup zone already?

    Maybe this helps:


    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Andreas Baumgarten