• Domain Name Service

dns
  1. Help Center
  2. Domain Name Service
  3. User Guide
  4. FAQs
  5. How Can I Configure a PTR Record for an ECS Private IP Address?

How Can I Configure a PTR Record for an ECS Private IP Address?

PTR records enable visitors to query domain names based on IP addresses.

On the PTR Records page on the console, you can configure PTR records for EIPs. If you want to add PTR records for ECS private IP addresses, create a private zone and create PTR records in the zone.

The domain name in a PTR record is specified in the x.x.x.x.in-addr.arpa format.

NOTE:

in-addr.arpa is the domain name suffix for reverse resolution.

For example, if the private IP address is 192.168.1.10, its domain name in the PTR record is 10.1.168.192.in-addr.arpa.

In this case, you need to create a private zone 192.in-addr.arpa and add a PTR record 10.1.168.192.in-addr.arpa.

Creating a Private Zone

  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 Private Zones.

    The Private Zones page is displayed.

  4. Click on the upper left and select the desired region and project.
  5. Click Create Private Zone.
    Figure 1 Create Private Zone
  6. Configure the parameters according to Table 1.
    Table 1 Parameters required for creating a private zone

    Parameter

    Description

    Example Value

    Name

    Domain name

    Set the domain name suffix to in-addr.arpa.

    192.in-addr.arpa

    VPC

    VPC to be associated with the private zone

    -

    Email

    (Optional) Email address of the administrator managing the private zone

    It is recommended that you set the email address to HOSTMASTER@Domain name.

    For more details about the email address, see Why Is the Email Address Format Changed in the SOA Record?

    HOSTMASTER@example.com

    Tag

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

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

    example_key1

    example_value1

    Description

    (Optional) Description of the domain name, which cannot exceed 255 characters

    This is a private zone.

    Table 2 Tag key and value requirements

    Parameter

    Requirement

    Example Value

    Key

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

    example_key1

    Value

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

    example_value1

  7. Click OK.

    You can query information about the private zone you created on the Private Zones page.

    NOTE:

    Click the zone name to query detailed zone information. The system has created record sets of the SOA type and NS type in the zone.

    • The SOA record set determines the DNS server that is the authoritative information source for a particular domain name.
    • The NS record set defines authoritative DNS servers for a zone.

Adding a PTR Record

  1. In the zone list on the Private Zones page, click the name of the private zone you created.

    The record set page is displayed.

  2. Click Add Record Set.

    The Add Record Set box is displayed.

    Figure 2 Add Record Set

  3. Configure the parameters according to Table 3.
    Table 3 Parameters required for adding a record set of the PTR type

    Parameter

    Description

    Example Value

    Name

    IP address in the PTR record (typed in reverse order)

    10.1.168

    For example, if the IP address is 192.168.1.10, the name of the PTR record is 10.1.168.192.in-addr.arpa.

    • If the private zone name is 192.in-addr.arpa, enter 10.1.168 in the box.
    • If the private zone name is 1.168.192.in-addr.arpa, enter 10 in the box.

    Type

    Type of the record set

    PTR – Map IP addresses to domains

    TTL (s)

    Caching period of the record set (in seconds)

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

    Value

    Domain name mapped to the IP address

    You can enter only one name at a time.

    mail.example.com

    Tag

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

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

    example_key1

    example_value1

    Description

    (Optional) Description of the domain name

    The PTR record is for reverse resolution.

  4. Click OK.