DNS Lookup

What is a PTR record (reverse DNS)?

The reverse record that says which name an IP address belongs to; essential if you run your own mail server.

A PTR (pointer) record is a DNS record that says which name an IP address belongs to. It does the opposite of an A record: the A record turns a name into an IP, the PTR turns an IP into a name. That's why a PTR lookup is also called reverse DNS (rDNS).

mail.example.com.           IN   A     203.0.113.25
25.113.0.203.in-addr.arpa.  IN   PTR   mail.example.com.

How is a PTR record written?

PTR records don't live in ordinary domains but in special zones reserved for IP addresses. The groups of an IPv4 address are reversed and in-addr.arpa is appended:

IP addressName the PTR lookup is made for
203.0.113.2525.113.0.203.in-addr.arpa
2001:db8::25Each of the address's 32 hex digits is reversed one by one and ip6.arpa is appended

The reversal is because DNS is hierarchical from right to left. The organisation that owns the IP block (203.0.113) can then manage the names beneath its block.

What is a PTR record for?

For websites a PTR record makes practically no difference; visitors reach the site by name. Where it really matters is mail servers.

Receiving mail servers look at the PTR record of the connecting server's IP address. If there's no PTR, or it returns a generic name that looks like a home connection (203-0-113-25.dynamic.isp.net), the mail will most likely go to spam or be rejected outright. Gmail requires every server that sends it mail to have a valid PTR record.

Forward-confirmed reverse DNS (FCrDNS)

Most receiving servers check not just that a PTR exists but that it's consistent:

  1. The IP address's PTR record is read: 203.0.113.25 → mail.example.com
  2. The A record of the returned name is read: mail.example.com → 203.0.113.25
  3. If both point to the same IP, the check passes.

This is called forward-confirmed reverse DNS. The name your mail server introduces itself with in the SMTP session (HELO/EHLO) should ideally match the name in the PTR as well.

Who sets the PTR record?

You don't add the PTR record in your domain's DNS panel. Whoever owns the block the IP address belongs to also manages its PTR:

  • If you rent a virtual (VPS) or dedicated server: the provider's panel usually has a "Reverse DNS" or "rDNS" setting. If not, ask support.
  • If you're on shared hosting: the IP address is shared by many customers, so you can't change the PTR; the hosting company has set its own server name. In that case it's better to send mail through a service such as Google Workspace or Microsoft 365.
  • If you run a server with a static IP in your office: you have to ask your internet service provider.
  • Services like Google Workspace or Microsoft 365: they send mail from their own servers, which already have PTR records; there's nothing for you to do.

How do you check a PTR record?

When you look up your domain with our lookup tool, the PTR value is shown under every IP address in the A and AAAA records. You can also enter an IP address directly to see its PTR, forward confirmation and blacklist status. On the command line you can use:

dig -x 203.0.113.25 +short
nslookup 203.0.113.25

Common mistakes

  • Trying to add the PTR in the domain's DNS panel. Nobody ever queries a PTR record added there.
  • Forgetting the A record of the name the PTR points to. The FCrDNS check fails.
  • Setting more than one PTR for an IP. Technically possible, but receivers get inconsistent results; use a single PTR per IP.
  • Forgetting the IPv6 address of the sending server. If the server also connects over IPv6, that address needs a PTR record too. Gmail is especially strict about this for mail arriving over IPv6.