Normal DNS answers the question "what is the IP address of this name?". Reverse DNS asks the opposite: "which name belongs to this IP address?" It sounds like a footnote, but if you send email from your own server, a missing reverse record can quietly put your messages in the spam folder.

How the lookup actually works

Reverse lookups use a record type called PTR (pointer) and a special part of the DNS tree. To look up 8.8.8.8, the resolver flips the four numbers around and adds in-addr.arpa, then asks for a PTR record at 8.8.8.8.in-addr.arpa. We tried exactly that from our server:

$ dig +noall +answer -x 8.8.8.8
8.8.8.8.in-addr.arpa.  86400  IN  PTR  dns.google.

$ dig +noall +answer -x 1.1.1.1
1.1.1.1.in-addr.arpa.  1800  IN  PTR  one.one.one.one.

The numbers are flipped because DNS reads names from right to left, from the most general part to the most specific, whereas IP addresses are written the opposite way round. An IP block is handed out in chunks, so reversing the octets lets the whole tree delegate authority neatly: a provider owns, say, everything under 113.0.203.in-addr.arpa and answers for it.

IPv6 follows the same idea in a more tedious format. Each hexadecimal digit becomes its own label, written in reverse and ending in ip6.arpa. Nobody types these by hand; the -x flag handles it for you.

Why anyone cares

For most people reverse DNS is invisible. It matters in three situations.

  • Email delivery. When your mail server connects to Gmail, Outlook or any decent mail system, the receiving side looks up the PTR of your IP. No record, or one that looks like ip-203-0-113-10.provider.net, tells a spam filter this is probably a residential line or a throwaway server. Plenty of providers will reject or junk the message on that evidence alone.
  • Readable logs. Traceroutes, firewall logs and server access logs become far easier to follow when addresses turn into names.
  • Security and abuse work. Investigators use the PTR and surrounding records to work out who runs a suspicious address.

Forward-confirmed reverse DNS

A PTR record on its own proves very little, because whoever controls the reverse zone can write anything into it. The check mail servers actually want is forward-confirmed reverse DNS (FCrDNS), and it takes three steps:

  1. Look up the PTR for the connecting IP, which gives a hostname such as mail.example.com.
  2. Look up the A record of that hostname.
  3. Check the result contains the original IP address.

If the circle closes, the IP and the name vouch for each other. The hostname in your mail server's greeting (the HELO or EHLO) should be that same name. A mismatch between the three is one of the easiest things for a filter to penalise.

You can't set it where you set everything else

This is the part that surprises people. The reverse zone for an IP address belongs to whoever owns the address, which is nearly always your hosting company or ISP, not the registrar where you bought your domain. Editing your domain's DNS has no effect on it.

So the process goes like this. First, decide on a hostname, for example mail.example.com. Second, create the matching A record in your own DNS. Third, set the PTR through your provider: most cloud and VPS hosts have a "reverse DNS" field next to the server's IP in the control panel, and smaller ISPs will do it on request via a support ticket.

Larger customers who control a small block of addresses sometimes receive a classless delegation and can run the reverse zone themselves, but most of us never need that.

Running a check

Any of these three will do:

dig -x 203.0.113.10 +short
host 203.0.113.10
nslookup 203.0.113.10

You can also paste an IP into our IP address lookup, which shows the reverse hostname next to the network owner and location. To see whether a lookup answer is the same from every resolver, choose the PTR type in the DNS checker and enter the IP address.

A typical case: mail rejected, DNS looks fine

This pattern is common. A small business sets up its own mail server on a new VPS. SPF and DKIM are perfect and the domain's MX records are correct, yet messages to certain providers bounce with a line mentioning "reverse DNS" or "PTR". The cause is nearly always that the server still carries the host's default name, something like vps-1a2b3c.hosting.example, so the three-way match between greeting, PTR and A record can't succeed. Ten minutes in the control panel fixes it, and the rejections stop. Check the PTR before you send the first message, not after the first bounce.

Common problems and quick fixes

  • No PTR at all. Ask your provider to add one, or use the control panel field.
  • A generic provider name. It works technically but looks untrustworthy. Replace it with a hostname on your own domain.
  • PTR doesn't match the forward record. Fix whichever side is wrong so the loop closes.
  • Several PTR records on one IP. Some software gets confused. Keep exactly one.
  • Old value still showing. PTR records have TTLs like any other. The 8.8.8.8 record above is cached for a full day, so changes can take time to appear.

One piece of a bigger puzzle

Reverse DNS is only one of several signals. A well-behaved mail domain also needs sensible SPF, DKIM and DMARC records, covered in our email authentication guide, and an IP that isn't on any blacklist, which you can test with the blacklist checker. Get all of them lined up and the delivery problems that seem mysterious usually disappear.