• Domain Name Service

  1. Help Center
  2. Domain Name Service
  3. User Guide
  4. Getting Started
  5. Creating a PTR Record

Creating a PTR Record


PTR records are used to prove the credibility of IP addresses and domain names of email servers. Most spam senders use email servers whose IP addresses are dynamically allocated or not mapped to registered domain names to avoid being tracked. If you do not want emails sent from your email server to be considered as spam, you need to add a PTR record to map the email server IP address to a domain name. In this way, the email recipient can obtain the domain name by IP address and will know that the email server is trustworthy.

By creating a PTR record, you can map an EIP of another cloud service, for example, ECS, to a domain name.


After an ECS is successfully created and assigned with an EIP, a PTR record will be generated for the EIP by default in format of ecs-xx-xx-xx-xx.compute.xxx.com, where xx-xx-xx-xx is the EIP and xxx the domain name provided by the cloud platform.

You can use one of the following methods to query the default PTR record of an EIP:

  • ping -a EIP
  • nslookup [-qt=ptr] EIP
  • dig -x EIP

The default PTR record of the EIP may not be applicable in some scenarios. For example, it cannot be used as the domain name of an email server. In this case, you need to create a new PTR record for the EIP.

After you create a new PTR record, the default record will be overwritten.

This section describes how to create a PTR record for reverse domain name resolution.

Restrictions and Limitations

Currently, you can configure a PTR record only for IP addresses with a 32-bit subnet mask.


  1. Log in to the management console.
  2. In the Network category, click Domain Name Service.

    The DNS console is displayed.

  3. In the navigation pane, choose PTR Records.

    The PTR Records page is displayed.

  4. Click on the upper left and select the desired region and project.
  5. Click Create PTR Record.
    Figure 1 Create PTR Record
  6. Configure the parameters according to Table 1.
    Table 1 Parameters required for creating a PTR record



    Example Value


    EIP obtained from another cloud service (for example, ECS)

    You can select an EIP from the drop-down list.


    Domain Name

    Domain name mapped to the EIP


    TTL (s)

    Caching period of the PTR record (in seconds)

    The default value is 300s, that is, 5 min.



    (Optional) Identifier of a resource. Each tag contains a key and a value. You can add 10 tags at most to a PTR record.

    For details about tag key and value requirements, see Table 2.




    (Optional) Description of the PTR record

    The PTR record is for reverse resolution.

    Table 2 Tag key and value requirements



    Example Value


    • Cannot be left blank.
    • Must be unique for each resource.
    • Consists of at most 36 characters.
    • Contains only letters, digits, hyphens (-), and underscores (_).



    • Cannot be left blank.
    • Consists of at most 43 characters.
    • Contains only letters, digits, hyphens (-), and underscores (_).


  7. Click OK.

    You can query information about the PTR record you created on the PTR Records page.

    Figure 2 PTR Records

    If the domain name, for example, example.com, is mapped to multiple EIPs, you need to create a PTR record for each EIP.