# Reverse DNS for a VPS

> What reverse DNS is, and why mail servers check it before they trust your email. How to set the PTR record for your VPS in the host's panel.

**Course:** [VPS Hosting](https://learn.benibix.com/learn/infrastructure-vps)  
**Time:** 10 min

**After this lesson you can:**

- Tell forward DNS from reverse DNS
- Set a PTR record in the host's panel
- Check reverse DNS with dig -x

## Why your mail needs a name for your address

Reverse DNS turns an IP address back into a name. Normal DNS goes from a name, such as mail.jack.example, to an address, such as 203.0.113.10. Reverse DNS goes the other way. The record that holds it is called a PTR record, and only the owner of the address can set it.

On a VPS, the host owns the address and lends it to you. So the PTR record is set in the host's panel, not where you keep your other DNS records. Most hosts give each server a default name, which looks like a long string of numbers and the host's own domain.

Mail is the main reason it matters. When your server sends an email, the server that receives it looks up your address backwards. If there is no name, or the name looks like a default, it may reject the mail or file it as spam.

The check goes further than that. The receiving server takes the name from the PTR record and looks it up forward. If that name points back to the same address, the two agree. That match is a sign of a real sender.

So setting it up is two steps. Give your server a name, such as mail.jack.example, with a normal A record. Then set the PTR record for its address to that same name in the host's panel.

For a website alone, reverse DNS hardly matters. Browsers never check it. It matters for any server that sends mail, and it makes logs easier to read, because addresses show up as names.

A common mistake is to set the PTR record to a name that does not point back. The two lookups then disagree, and mail is still marked as spam. Check both ways with dig before you send the first email.

```console
$ dig -x 203.0.113.10 +short
mail.jack.example.
$ dig mail.jack.example +short
203.0.113.10
```
The address gives back the name, and the name gives back the address. The two agree.

![Two rows. Forward DNS: the name mail.jack.example points by an A record to 203.0.113.10, set by the owner of the name at the DNS host. Reverse DNS: the address 203.0.113.10 points back by a PTR record to mail.jack.example, set by the owner of the address, the VPS host, in its panel. A line at the bottom says both give the same name, so the mail looks like it came from a real sender.](https://learn.benibix.com/diagrams/infc-reverse-dns.svg)

### Example: Jack's mail lands in spam

Jack's server sends order emails, and 40 percent land in customers' spam folders. dig -x shows his address still has the host's default name.

He sets the PTR record to mail.jack.example. That name already points at the server. A day later, his test emails reach the inbox.

**Words in this lesson:** [Domain Name System (DNS)](https://learn.benibix.com/term/infrastructure/dns), [Reverse DNS (rDNS)](https://learn.benibix.com/term/infrastructure/reverse-dns)

**Question:** Where do you set the PTR record for your VPS address?

**Answer:** In the host's panel, because the host owns the address. Only the owner of an address can set its PTR record. On a VPS, that owner is the host, so the setting is in its panel.

---

Source: https://learn.benibix.com/learn/infrastructure-vps/reverse-dns-for-a-vps
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
