Reverse DNS lookups and PTR records

Updated at:

A forward DNS lookup maps a domain name to an IP address. A reverse DNS lookup maps an IP address to a domain name.

Reverse DNS lookup

A single IP address can be associated with multiple domain names. A reverse DNS lookup resolves an IP address to its corresponding domain name. However, it is not feasible to search the entire Domain Name System (DNS) to find this mapping. To solve this, RFC 1035 defines the PTR (Pointer) record. A PTR record maps an IP address to a domain name.

Configuration procedure

  1. Create a reverse lookup zone for the IP address network.

  2. In the corresponding reverse lookup zone, add the required PTR records.

For example, if your network address range is 192.168.0.1-192.168.0.255, which is part of the 192.168.0.0/24 network, the corresponding reverse lookup zone is 0.168.192.in-addr.arpa. When you add a PTR record in the zone 0.168.192.in-addr.arpa with the hostname set to 1 that points to www.example.com, the reverse DNS lookup for the IP address 192.168.0.1 resolves to www.example.com.

In a private network environment, you can manage the following reserved address ranges and create reverse lookup zones.

  • 10.0.0.0 - 10.255.255.255

  • 172.16.0.0 - 172.31.255.255

  • 192.168.0.0 - 192.168.255.255

Important

To add a PTR record for a public IP address, see What is a reverse DNS lookup.

Add a PTR record in Private Zone

This example adds a reverse lookup zone for the 192.168.1.0/24 address range:

Note

The name of the reverse lookup zone for this address range is 1.168.192.in-addr.arpa. The .in-addr.arpa is a fixed suffix.

  1. Go to Alibaba Cloud DNS - Private Zone.

  2. On the Authoritative Zone page, select the User Defined Zones tab and click Add Zone.

  3. In the Authoritative Zone field, enter the reverse lookup zone. In this example, enter 1.168.192.in-addr.arpa. Then, submit the form.

  4. On the User Defined Zones tab, find the newly added authoritative zone and click Settings in the Actions column.

  5. Click Add Record. Add a PTR record, set the hostname to 1 (corresponding to IP address 192.168.1.1 in this example), and point it to host001.example.com.

  6. Submit the form.

Set the scope

On the User Defined Zones tab, click Effective Scope in the Actions column for the target zone. In the Effective in on-premises DNS clusters section, select the desired on-premises DNS cluster from the drop-down list. To prevent resolution failures from an empty zone, we recommend setting the effective scope only after you configure DNS records.