What is a DNS PTR record?


We have introduced you to different DNS record types in our blog, including the A record, AAAA registration, and DNS MX record. This post explores the DNS PTR record and everything you need to know about it. Let’s start!

What is a PTR record in DNS?

What is a PTR record in DNS? A PTR or pointer record is a type of DNS record that provides the domain name associated with a certain Internet Protocol (IP) address. This is the exact opposite of DNS A record.

While the DNS A record provides the IP address of a domain name, a PTR record provides the domain name of an IP address. PTR-record DNS is often used in reverse DNS lookup.

Typically, when you attempt a domain lookup in your browser, a DNS lookup occurs, matching the domain name to the IP address. The reverse happens in reverse lookup – this is a DNS query that starts with the IP address and searches for the domain name.

PTR record syntax

The structure of a PTR record is similar to that of other DNS record types. Below is the format of a PTR record.

  • – The first PTR record field containing the IP address.
  • – Determines the validity period of a request in seconds before it must be reactivated.
  • – Contains the abbreviation of the network class used.
  • – Defines the recording type.
  • – Contains resource data—the domain name.

The PTR syntax is structured the same as the A record, but the field content differs.

Why do you need a DNS PTR record?

The average user or computer doesn’t need a PTR record, but it’s still a valuable tool for security purposes. Here are some benefits of including a PTR record in your DNS.

  • Security: DNS PTR records help receiving servers validate your emails sent via reverse DNS lookup. Likewise, your mail servers typically check PTR records to validate the authenticity of incoming messages.
  • Validation: The most popular email providers generally reject or mark messages as spam if they do not contain the required PTR configuration. A PTR record is essential if you don’t want your mail to end up in your recipient’s spam box or be blocked altogether.
  • Investigation: Some systems only store the IP address, not the domain name. In such a case, PTR records help identify the source of the traffic in a human-readable format.

How to add a PTR record in DNS?

Creating or adding a PTR record to your DNS is simple. First, you need to create a reverse DNS zone on the DNS name server for your server’s primary IP address, depending on the size of your IP address:

  • For IPv4 addresses, create the reverse DNS zone hostname by:
  • Take your IP address, for example 192.168.0.100
  • Removed last set of numbers (or byte): 192.168.0.
  • Reverse digits: 0.168.192
  • By adding “.in-addr.arpa” at the end, you get the domain of the reverse zone: 0.168.192.in-addr.arpa.

“.arpa” was the first top-level domain name created for the Internet and today is mainly used to manage network infrastructure. This is also where DNS PTR records are stored (more on this below).

DNS PTR records for IPv6 addresses exist in a separate namespace within the top-level “.arpa” domain. They are reversed and converted to 4-bit sections with the suffix “.ip6.arpa”.

For example, the IPv6 address 4321:0:1:2:3:4:567:89ab would have a DNS reverse lookup domain like: ba9.8.7.6.5.0.4.0.0.0.3.0.0.0.2.0.0.0.1 . 0.0.0.0.0.0.0.1.2.3.4.ip6.arpa.

You can add a pointer record to your forward mapping areas to also support zero-configuration networking.

If you want to learn how to add a PTR record in DNSFollow these steps:

  • Open your DNS provider’s control panel or portal.
  • Click Manage > DNS > Zones.
  • Click the DNS View tab.
  • Click on the Zone.
  • Select “Create Record” and choose “PTR Record” from the available options.
  • Enter the information below on the PTR registration page:
  • Domain name or IP address: Specify the Internet Protocol (IP) address or domain name.
  • Area: Choose an area from the available options.
  • The description: Enter a comment describing the PTR record.
  • Lifetime : Enter a number and select Hours, Minutes, and Seconds from the options.
  • Disable for DNS protocol: You can check this box to temporarily disable the DNS protocol.
  • Key words: Hit ‘To add’ to attach keys to the value and specify the following:
  • Key: Enter a name for the key.
  • Assess: Provide a value for the key.
  • Click “Save and Close” to create your DNS PTR record.
  • Options for storing DNS PTR records

Unlike an A record, which is stored under the domain name, a Pointer record is stored in the IP address with “.in-addr.arpa” appended. For example, the PTR record for the IP address 192.168.2.10 will be stored as “10.2.168.192.in-addr.arpa”. The “in-addr.arpa” was included because the .arpa top-level domain in DNS holds the PTR record.

How do I search for a PTR record?

Like other DNS records, you can perform a PTR DNS record lookup to check if your details are correct. As PTR records are used for security and verification, your emails may end up in the spam box if configured incorrectly. You can make your PTR record search using online tools or the command line.

Use of online tools

You can use online tools like EasyDMARC Finding DNS Records checker to instantly search PRT records – find the domain name of an IP address. Simply enter the IP address in the field provided and click the “Search DNS” button.

Using the command line

You can also use your command line to look up your PTR record and check if your IP address matches its corresponding hostname.

Windows users can use the following command line:

nslookup IP_ADDRESS

The process is similar if you want to perform a PTR search as a macOS user. You can use the command below.

dig -x IP_ADDRESS

Summary

Although PTR registration is not mandatory, it is necessary for security and verification purposes. Email providers often use the PTR record to help confirm the authenticity of messages.

Setting up a PTR record on your DNS is essential to avoid spam folders or rejection. Now that you know how to add a PTR record to DNS serversyou can ensure correct configuration while simultaneously improving the security of incoming emails and the authenticity of your outgoing emails.

Check out our other blogs if you want answers to questions like: What is a DNS record? You will also learn about DNS spoofing and various others types of cyber attacks. Stay informed, stay safe.

The post office What is a DNS PTR record? appeared first on EasyDMARC.

*** This is a syndicated blog from the Security Bloggers Network of EasyDMARC written by Knarik Petrosyan. Read the original post at: https://easydmarc.com/blog/what-is-a-dns-ptr-record/

Previous How to Change DNS Servers in Windows
Next Dud DNS upgrade at Freeparking disrupts service providers and customers