1. Knowledge Base
  2. >
  3. Results
  4. >
  5. Reverse DNS Record, PTR, Pointer Record

Reverse DNS Record, PTR, Pointer Record

This article discusses what a PTR record is, how to add PTR records, and how it works with mail servers.

The reverse DNS record (rDNS) is also known as the PTR record, pointer record, or IP resolver. A PTR is a reverse record for an IP address that allows an IP to map to a domain and vice versa. That means you can make hostgator.com point to 10.0.0.1 and make a PTR record so that 10.0.0.1 if checked, would tell you that it belongs to hostgator.com. It lets the receiver of your emails check for possible spoof emails, which will be treated as spam. Without this record, the receiver must rely on guessing if your email might be spam.

Generally, when you have a PTR record, your emails have a better chance to deliver to the recipient's inbox instead of the spam folder.

Common uses for PTR records

  • Logging - PTR record is used in logging to help provide human-readable data rather than logs consisting of entirely IP addresses.
  • Anti-spam purposes- There are some email anti-spam filters that use PTR records to check the domain names of email addresses. They check if the associated IP addresses are likely to be used by legitimate email servers.
  • Troubleshoots email delivery issues - Missing or misconfigured PTR records may result in email delivery problems. Email services may block all emails from a domain without a PTR record or if a PTR record contains an incorrect domain.

How to add PTR record to my HostGator account

Shared and Reseller hosting

HostGator has already set up PTR records for shared and reseller servers by default.

VPS and Dedicated hosting

We can create a PTR record on your domains at your request. Let us know via phone or Live Chat so we can assist you.


How mail servers check the PTR record

When the sending server, for instance, a VPS, 'tacocat.exampledomain.com,' sends an email to Gmail, from the address 'random@somedomain.com,' it will connect to the Gmail server and tell it, "Hello, I'm tacocat.exampledomain.com."

Gmail then has the option to either say, "What email do you have for me?" or "Let me look into this..."

If it's the latter, Gmail will pull an rDNS record on the IP that 'tacocat.exampledomain.com' is connecting from. It does NOT check the domain 'somedomain.com.' That would only occur for reverse user checking, which has nothing to do with rDNS records (or if the admin of the mail server felt especially evil).

If the rDNS record comes up as 'tacocat.exampledomain.com,' then Gmail will be happy.

If the hostname does not match...

In some cases, if the rDNS comes up as 'somedomain.com' and 'somedomain.com' points to that IP address, some email servers will accept that since the mail server IP can map back to itself even if its hostname claim does not match. Do not rely on the external mail server being that smart, though.

The times when this is not true is when exim is configured to send from other IP addresses dependent on its hostname. This can be seen by checking /etc/mailips. Most clients do not have this and do not need it.