All Products
Search
Document Center

Alibaba Cloud DNS:Add PTR records

Last Updated:Nov 07, 2023

Reverse DNS lookup

A forward Domain Name System (DNS) lookup maps a domain name to an IP address and a reverse DNS lookup maps an IP address to a domain name.

Before you perform a reverse DNS lookup, you must check whether the IP address corresponds to one or more domain names. It is too time-consuming to go through the entire DNS system to find the corresponding domain names for an IP address. Therefore, you can use pointer (PTR) records defined in RFC 1035 to map IP addresses to domain names.

How to add PTR records

Before you add a PTR record, you must create a reverse lookup zone file and add the IP address for the reverse DNS lookup to the zone file.

For example, you are allocated the CIDR blocks 192.168.0.1 - 192.168.0.255 and the Class C IP address 192.168.0.1/24. Then, the name of the reverse lookup zone file is 0.168.192.in-addr.arpa. If you create a PTR record that points 1 to www.example.com in the 0.168.192.in-addr.arpa zone file, the IP address 192.168.0.1 is reversely resolved to www.example.com.

Note

Reverse DNS lookups are available on the Internet only after you apply to the Internet service provider (ISP) that owns IP addresses and your application is approved. If the IP address of your server is allocated by Alibaba Cloud, you are not charged for adding PTR records. You can submit a ticket so that the after-sales service personnel of Alibaba Cloud servers can add PTR records for you.

You can manage the following CIDR blocks in your own virtual private clouds (VPCs):

  • 10.0.0.0 - 10.255.255.255

  • 172.16.0.0 - 172.31.255.255

  • 192.168.0.0 - 192.168.255.255

Accordingly, you can create reverse lookup zone files for these CIDR blocks in the Private DNS console without submitting applications to the ISP.

Procedure for adding a PTR record in the Private DNS console

The following example describes the procedure for creating a reverse lookup zone file for the CIDR block 192.168.1.0/24:

Note

The reverse lookup zone file for the CIDR block 192.168.1.0/24 is 1.168.192.in-addr.arpa, where .in-addr.arpa is a fixed suffix.

  1. Log on to the Alibaba Cloud DNS console.

  2. In the left-side navigation pane, click Private DNS (PrivateZone). On the page that appears, click Configuration Mode in the upper-right corner, click the Built-in Authoritative Module tab, and then click the User Defined Zones tab.

  3. Click Add New Zone. In the Add Built-in Authoritative Zone panel, enter the name of the reverse lookup zone file for Built-in Authoritative Zone. For this example, enter 1.168.192.in-addr.arpa. Select a zone type. For this example, select Built-in Authoritative Acceleration Zone (Recommended). Then, click OK.

    image.png
  4. Find the new built-in authoritative zone on the User Defined Zones tab and click Resource Records Settings in the Actions column.

  5. On the Resource Records Settings page, click Add Record. Then, add a PTR record that points 1 to host001.example.com.

    image.png
  6. Click OK. In the Change Resource Record Confirmation message, verify that the DNS record settings are correct and click OK.

  7. Go back to the User Defined Zones tab, find the new zone and click Effective Scope Settings in the Actions column. Then, select one or more VPCs where the new zone takes effect. image.png