Help Center/ Domain Name Service/ Getting Started/ Translating an IP Address to a Domain Name
Updated on 2024-11-04 GMT+08:00

Translating an IP Address to a Domain Name

Scenarios

PTR records are used to prove credibility of IP addresses and domain names of email servers. To avoid being tracked, most spam senders use email servers whose IP addresses are dynamically allocated or not mapped to registered domain names. If you want to keep the spam out of your recipients' inbox, add a PTR record to map the email server IP address to a domain name. In this way, the email recipients can obtain the domain name by IP address and will know that the email server is trustworthy.

If you use an ECS as an email server, configure a PTR record to map the EIP of the ECS to the domain name.

This following are operations for you to add a PTR record for a cloud resource, such as ECS.

Preparations

Before configuring PTR records, you need to sign up for a HUAWEI ID and enable Huawei Cloud services, complete real-name authentication, top up your account, register a domain name with Huawei Cloud or a third-party domain name registrar, deploy an ECS, and bind an EIP to it.

  1. Sign up for a HUAWEI ID.

    For details, see Sign up for a HUAWEI ID and enable Huawei Cloud services.

  2. Complete real-name authentication.

    For details, see Real-Name Authentication.

    If you have enabled Huawei Cloud services and completed real-name authentication, skip this step.

  1. Top up your account.

    For details, see Topping up an Account.

Constraints

  • You can only create PTR records for IP addresses with a 32-bit subnet mask.
  • Only one PTR record can be created for an EIP.
  • An EIP can be mapped to no more than 10 domain names.

Procedure

  1. Go to the PTR Records page.
  2. Click on the upper left and select the desired region and project.
  3. Click Create PTR Record and configure the following parameters.

    Retain the default values for other parameters. For details, see Creating a PTR Record.

    Table 1 Parameters for creating a PTR record

    Parameter

    Example Value

    Description

    EIP

    XX.XX.XX.XX

    EIP of another cloud resource, for example, an ECS.

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

    Domain Name

    example.com

    Domain name mapped to the EIP.

    TTL (s)

    300

    Cache duration of the PTR record, in seconds

    Default value: 300

    Tag

    example_key1

    example_value1

    Tag that will be added to classify and identify the PTR record.

    Description

    The description of the PTR Record.

    Supplementary information about the PTR record.

  4. Click OK.

    You can view the created PTR record on the PTR Records page.

    If a domain name is mapped to multiple EIPs, you must create a PTR record for each EIP.

  5. In the DOS window of your local PC that has been connected to the Internet, check whether the PTR record takes effect.
    1. Press Win+R to open the Run dialog box, enter cmd, and press Enter.

    1. Run the following command in the DOS window:
      nslookup -qt=ptr [IP address]