Skip to content

Reverse DNS and PTR records

Updated

Normal DNS turns a name into an address. Reverse DNS goes the other way and turns an address into a name. The answer is stored in a PTR record, in a special part of the DNS tree built from the address written backwards.

How the lookup works

For an IPv4 address, the four numbers are reversed and placed under in-addr.arpa. IPv6 addresses are written out one hexadecimal digit at a time, reversed, and placed under ip6.arpa.

203.0.113.7  is looked up as  7.113.0.203.in-addr.arpa

Who controls it

The reverse name belongs to whoever holds the block of addresses, usually an internet provider or hosting company, not to the owner of a domain. If you run a server and want a particular reverse name, you ask the company that gave you the address. Many addresses have no reverse name, and home connections often have a generic one that mentions the provider and the address.

Why mail servers check it

Receiving mail servers often look up the reverse name of the server that is sending to them. They like to see a real name whose own address record points back to the same address. This is called forward-confirmed reverse DNS. A sending server with no reverse name, or one that does not match, looks more like a hijacked machine, and its mail is more likely to be rejected or treated as spam.

Good to know. A reverse name is a label chosen by the address owner. It can hint at who runs a connection, but it can say anything, so it proves nothing on its own.

See the reverse DNS name of your own address