What Is Reverse DNS (PTR) and Why Does Your VPS Need It?

When you type a domain name into your browser, DNS translates it into an IP address. That is forward DNS, and every website owner sets it up sooner or later. Reverse DNS does the opposite: it translates an IP address back into a hostname.

If you run your own VPS, reverse DNS is one of the small settings that separate a properly configured server from one that quietly gets its email ignored. This guide explains what a PTR record is, how to check yours, and how to set one up correctly. New to running a server in the first place? Start with what a VPS is and how it works, then come back for the DNS details.

What Is a PTR Record?

A PTR record (pointer record) is a DNS record that maps an IP address to a hostname. Normal DNS records like A and AAAA point a name at an IP. A PTR record points an IP back at a name.

These records live in special DNS zones: in-addr.arpa for IPv4 addresses and ip6.arpa for IPv6 addresses. When someone queries the reverse DNS of an IP, their resolver rewrites the address, appends one of those zones, and looks up the PTR record. For example, the reverse lookup of 203.0.113.45 queries the zone 45.113.0.203.in-addr.arpa.

The answer might be mail.example.com or server-01.example.com. If there is no PTR record, the query simply returns nothing, and the IP has no reverse DNS.

Forward DNS vs Reverse DNS

Forward DNS Reverse DNS
Direction Name → IP address IP address → name
Record type A / AAAA PTR
Zone Your domain’s zone in-addr.arpa / ip6.arpa
Controlled by You, at your DNS provider The owner of the IP range (your VPS provider)
Typical use Connecting browsers to servers Verifying the identity of a server

Reverse DNS belongs to whoever owns the IP block, which is your hosting provider. You have to set it through them, not at your domain registrar.

Why Your VPS Needs Reverse DNS: Email Deliverability

The biggest practical reason is email. If your VPS sends mail (order confirmations from WordPress, password resets, monitoring alerts, or a full mail server), receiving servers will check its reverse DNS.

Here is what a typical check looks like. A mail server receives a message from your VPS at IP 203.0.113.45. Before trusting it, the receiving server:

  1. Looks up the PTR record of 203.0.113.45 and gets a hostname, say mail.example.com.
  2. Looks up the A record of mail.example.com and confirms it points back to 203.0.113.45.

This round trip is called Forward-Confirmed Reverse DNS (FCrDNS). When it passes, the receiving server has reasonable confidence the sender is who it claims to be. When the PTR record is missing or points to a hostname that does not resolve back, the message is more likely to land in spam or get rejected outright.

SPF, DKIM, and DMARC authenticate the domain in the email (the part after the @). Reverse DNS authenticates the server that sent it. Set up the domain-level records but skip the PTR record, and you still look suspicious to picky mail servers.

Other Reasons Reverse DNS Matters

Email is the headline use, but a correct PTR record helps elsewhere too:

  • Server logs become readable. Without reverse DNS, your SSH and mail logs fill up with raw IP addresses. With it, you see hostnames at a glance.
  • Monitoring and uptime tools display hostnames instead of IPs when they can resolve them.
  • Some services require it. Certain APIs, game servers, and enterprise networks refuse connections from IPs without reverse DNS.
  • It looks professional. If a client or partner runs a lookup on your server’s IP, a clean hostname beats a bare IP or a generic provider-assigned name.

How to Check Reverse DNS on Your VPS

You do not need any special tools. These commands run on any Linux VPS:

Using dig

dig -x 203.0.113.45 +short

The -x flag tells dig to do a reverse lookup. The output should be a hostname ending with a dot, like mail.example.com. If the output is empty, there is no PTR record for that IP.

Using host

host 203.0.113.45

This prints something like 45.113.0.203.in-addr.arpa domain name pointer mail.example.com.

Using nslookup

nslookup 203.0.113.45

Available on Linux, macOS, and Windows. The “name =” line in the output is the PTR record.

After checking the PTR, verify the round trip. Run dig mail.example.com +short (using the hostname from the PTR answer) and confirm the IP matches. If it does not, forward-confirmed reverse DNS fails even though a PTR record exists.

How to Set Up Reverse DNS for Your VPS

Setting reverse DNS is a two-step job:

  1. Set the PTR record at your VPS provider. Look in the provider’s control panel for a “Reverse DNS” or “PTR” field on your server or IP settings. Enter the hostname you want, for example mail.example.com. Some providers apply it instantly; a few require you to open a support ticket. If your provider does not offer reverse DNS at all, that is a reason to reconsider the provider for any email-sending server.
  2. Create a matching A record. At your DNS provider, point the same hostname back at your server’s IP. The PTR hostname and the A record must agree, or the forward-confirmed check fails.

Pick one hostname per IP. If your VPS hosts several domains, choose the primary one, usually the hostname of the server itself (for example server1.example.com) or your mail server’s hostname. Set reverse DNS for your IPv6 address too, if your provider assigned one and your services listen on it.

Propagation is fast. Because the change happens at the IP owner, the new PTR record is usually visible within minutes, occasionally a few hours.

Common Problems and Fixes

  • PTR exists but email still flagged: check the round trip with dig as shown above. A PTR pointing to a hostname with no matching A record fails FCrDNS.
  • Generic provider hostname: many providers set a default like 203-0-113-45.static.provider.net. That counts as valid reverse DNS, but replacing it with your own hostname looks cleaner and matches your A record.
  • Changed the A record but not the PTR: if you moved your site to a new server, update both sides. They are controlled in different places, so it is easy to forget one.
  • Multiple IPs, one hostname: a PTR record belongs to one IP. If your server has several IPs, give each a sensible PTR, or at least the ones that send mail.

Frequently Asked Questions

Is reverse DNS the same thing as a PTR record?

Yes. Reverse DNS is the concept, and the PTR record is the mechanism that implements it.

Do I need reverse DNS if my VPS never sends email?

It is less critical, but still worth setting. It costs nothing, takes a minute in your provider’s panel, and makes logs, monitoring, and troubleshooting cleaner. The moment you add email later (even just WordPress notifications), you will be glad it is already there.

Can I set reverse DNS at my domain registrar?

No. Registrars control your domain’s zone, not the IP’s zone. Reverse DNS is always set by the owner of the IP address, which is your VPS provider.

Reverse DNS is a five-minute task with an outsized payoff. Set the PTR record at your provider, match it with an A record, and verify the round trip with dig -x. And if you are still sizing the server itself, our guide to how much VPS you need for self-hosting covers the RAM and CPU math.

Ditulis oleh

Firdaus Safari Putra

Founder, PT FirKaizen Digital Solutions

Firdaus Safari Putra adalah founder PT FirKaizen Digital Solutions. Ia membangun dan mengoperasikan infrastruktur server di balik panduan ini, dan menulis berdasarkan apa yang benar-benar ia jalankan, uji, dan ukur — bukan teori.