Guides PTR

What is reverse DNS (PTR)?

Find the name associated with your mail server’s IP address and check that it points back to the same IP.

Your mail server sends a message for example.com. The receiver sees the IP address the connection comes from and can look up the name associated with it. This is a reverse DNS lookup. The name is stored in a PTR record.

Check reverse DNS for an IP address

First check one mail server

A mail server might be named example.com and use the address 192.0.2.44. This is a fictional address. In the tool, check your sending server's real public IP.

The check has two steps:

  • The receiver looks up a name for 192.0.2.44. The PTR answer is example.com.
  • It then looks up the address for example.com. In this example, the answer includes 192.0.2.44 again. This IPv4 address is published in an A record.

The two directions now match. This is called forward-confirmed reverse DNS. The original IP must appear in the address answer. Other addresses may appear alongside it.

A PTR belongs to the IP address. You usually configure it with the company providing that IP, rather than in your domain's normal DNS panel. The A record is managed in that domain's DNS settings. Sometimes one provider handles both.

Why it matters for mail

Receivers decide how to use reverse DNS. Gmail, for example, requires a PTR for the public sending IP and a matching A or AAAA forward mapping. Missing or incorrect records can lead to rejection.

A hosting provider's name can be a technically valid reverse mapping. Being 'generic' does not make the record invalid. A recognizable mail-server name helps with administration, but receivers may also apply their own naming and reputation policies. None of these checks guarantees inbox placement.

Visitors to an ordinary website generally do not need PTR. For email, check the server that actually sends. It may be different from your web server or incoming mail server.

Then do the same for IPv6

If your server also sends over IPv6, repeat the same check for that address. Only the address-record type changes: for IPv6, look up an AAAA record instead of an A record.

A fictional example: 2001:db8::44 points to example.com through PTR. That name's AAAA answer includes 2001:db8::44 again. A correct IPv4 setup therefore does not prove IPv6 is correct. Check every IP that actually sends.

How to set it up

  • Ask your mail administrator which public IPs send outgoing mail. Include IPv6 and backup servers where used.
  • With an external sending service, the provider usually manages this. Give it the sending IP and the actual rejection when reporting a problem.
  • For your own mail server, ask the IP provider to set PTR to the agreed hostname.
  • Have the DNS administrator publish A for that hostname pointing to the same IPv4 address and/or AAAA pointing to the same IPv6 address.
  • Run the reverse-DNS check for each sending IP, then check a real message delivery attempt. Allow for the TTL when changing records: old DNS answers can remain cached.

Reading the result

  • Forward mapping confirmed: the tested IP appears in the PTR hostname's address answer.
  • PTR missing: a completed lookup found no PTR. Ask the IP provider to configure it.
  • Forward mapping does not match: a PTR name was found, but a completed address lookup does not contain the original IP. Have PTR and A/AAAA compared.
  • Check incomplete: an error, timeout or other gap leaves the result unknown. This does not prove a record is missing.

If there are several PTR names, read the result for each one. One confirmed name does not prove the others match too. A DNS check also does not test an SMTP connection, message content or final delivery.

Primary sources

Frequently asked questions

Do I manage PTR in my own DNS?

Usually not. The PTR record belongs to the IP address, so the party that owns the IP (your hosting or provider) sets it. You request it from them.

Do I need reverse DNS for my website?

For a website it normally doesn't matter. It's mainly important for mail servers that send mail themselves.

What does 'forward-confirmed' mean?

The IP points to a name through PTR. That name's A answer for IPv4 or AAAA answer for IPv6 includes the original IP again. Both directions then match for the name tested.

Must PTR match my visible sender domain?

That is not a general reverse-DNS requirement. PTR describes the sending server, such as mail.provider.example. The visible From address can use another domain. SPF, DKIM and DMARC assess other parts of email. A matching PTR does not replace them.

My mail lands in spam. Could it be reverse DNS?

It can be a factor, especially with your own mail server without a (correct) PTR record. But also check SPF/DKIM/DMARC and blacklists. Usually it's a combination.

Check reverse DNS for an IP address →