What Is a PTR Record (Reverse DNS) and When You Need One
Basics4 minInnovialabs editorial team
In short
A PTR record maps an IP address back to a hostname; you need one mainly when a server sends email, and it is set by whoever owns the IP — your VPS or cloud provider — not at your domain registrar.
What a PTR record is
Regular DNS answers "which IP does mail.example.com have?" with an A or AAAA record. Reverse DNS answers the opposite question: "which hostname belongs to 203.0.113.10?" The answer lives in a PTR record.
Technically, reverse lookups use special zones. For IPv4 the octets are reversed and .in-addr.arpa is appended:
203.0.113.10 -> 10.113.0.203.in-addr.arpa. PTR mail.example.com.
For IPv6 the zone is ip6.arpa, written nibble by nibble. You rarely type these names yourself: providers hide them behind a simple form.
Why email depends on it
Most websites work fine without a PTR record. Email is the main exception.
When your server connects to another mail server, the receiver often checks:
- Does the connecting IP have a PTR record at all?
- Does the hostname in the PTR resolve back to the same IP through an A/AAAA record? This is called forward-confirmed reverse DNS (FCrDNS).
- Does the name look like a real mail server rather than a generic one such as
ip-203-0-113-10.provider.net?
If any check fails, the message may be rejected outright or sent to spam. Large mailbox providers list valid forward and reverse DNS among their requirements for senders. A missing PTR is one of the most common reasons why mail from a freshly set up VPS does not reach Gmail or Outlook.
PTR does not replace SPF, DKIM and DMARC. They solve different problems, and a sending server needs all of them.
Who controls the record
This is the part that confuses people most. The PTR record is managed by the owner of the IP address block, not by the owner of the domain.
| Record | Where you set it |
|---|---|
A, MX, TXT for example.com | Your DNS hosting or registrar |
PTR for 203.0.113.10 | The provider that gave you the IP: VPS host, cloud, data center or ISP |
That is why you will not find a PTR field in your registrar's DNS panel. If your IP comes from a home or office internet provider, you usually have to ask them, and consumer connections often cannot get a custom PTR at all.
How to set it up
- Choose the hostname, for example
mail.example.com. - Create the A record first:
mail.example.compointing to your server's IP. Many providers refuse to save a PTR that does not resolve back. - Set the PTR at the provider:
- most VPS panels have a "Reverse DNS" or "rDNS" field next to the IP;
- some providers set the PTR automatically from the server name, so the server must be named as a full hostname;
- in big clouds, reverse DNS is configured on a static or elastic IP through the console, API or a support request;
- if there is no option in the panel, open a support ticket.
- Match the mail server's greeting. The HELO/EHLO name your mail software announces should be the same hostname.
- Wait for DNS caches to update; this depends on the TTL.
Use one clear PTR per IP. Several PTR names for one address are technically possible but confuse checks.
How to verify
dig -x 203.0.113.10 +short
# mail.example.com.
dig mail.example.com A +short
# 203.0.113.10
On Windows, nslookup 203.0.113.10 shows the same reverse answer. Both directions must match. Online mail testers also show PTR status together with SPF, DKIM and DMARC.
When you do not need to worry
- Your site is on shared hosting, a CDN or a platform like Vercel and does not send mail itself.
- Your mail goes through Google Workspace, Microsoft 365 or a transactional email service. Their sending IPs already have correct PTR records; you only configure SPF, DKIM and DMARC for your domain.
You do need it if you run your own mail server or send mail directly from an application server via SMTP.