[ learn ]

Reverse DNS and PTR records

Updated · 4 min read

Short answer

Reverse DNS is a DNS lookup in the opposite direction: from an IP address to a name. It uses PTR records in special zones, in-addr.arpa for IPv4 and ip6.arpa for IPv6. For example, 8.8.8.8 has the PTR name dns.google. Reverse DNS is set by whoever controls the IP block, usually the ISP or host, not the domain owner.

How it works

DNS is organised by names, so IP addresses are turned into names by reversing them and adding a special suffix. For IPv4 the four bytes are written backwards under in-addr.arpa:

8.8.8.8          →  8.8.8.8.in-addr.arpa       PTR  dns.google.
1.1.1.1          →  1.1.1.1.in-addr.arpa       PTR  one.one.one.one.
203.0.113.25     →  25.113.0.203.in-addr.arpa

The reversal puts the most general part on the right, like a domain name, so the regional registry can delegate 113.0.203.in-addr.arpa to the network that holds 203.0.113.0/24, which then publishes PTR records for its own addresses.

For IPv6 every hex digit (nibble) becomes a label, in reverse, under ip6.arpa:

2001:4860:4860::8888  →
8.8.8.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.8.4.0.6.8.4.1.0.0.2.ip6.arpa

Who controls a PTR record

The reverse zone belongs to the holder of the IP block, not to the domain. If your website is on a cloud server, you set its PTR in the cloud provider's console; on a home or business line, you ask the ISP. Owning example.com does not let you set reverse DNS for the server's address, and the PTR can name any domain, so a PTR on its own proves nothing: anyone controlling an IP block could point it at google.com.

Forward-confirmed reverse DNS (FCrDNS)

To make reverse DNS trustworthy, check it both ways:

  1. Look up the PTR for the IP: 66.249.66.1 → crawl-66-249-66-1.googlebot.com.
  2. Look up the A or AAAA record for that name and confirm it returns the same IP.

If both match, the address is forward-confirmed: the owner of the domain agrees the IP is theirs. This is how sites verify that a visitor claiming to be Googlebot or Bingbot is real. The DNS lookup does the check for you when you enter an IP, for example /dns/8.8.8.8.

Why it matters for email

Mail servers lean heavily on reverse DNS. Many receivers reject or penalise mail from an IP with no PTR, or with a generic one such as 1-2-3-4.dynamic.isp.example, because that pattern is typical of infected home computers. Large mailbox providers ask bulk senders for a valid PTR that forward-confirms. If you run a mail server:

  • set a PTR on its sending IP that names the server, such as mail.example.com;
  • make sure that name resolves back to the same IP;
  • use the same name in the SMTP greeting (HELO/EHLO), and publish SPF, DKIM and DMARC as TXT records.

Why many IPs have no PTR

Reverse DNS is optional. Many networks never set it, some cloud addresses have none until the customer adds one, and huge IPv6 ranges cannot sensibly list a record for every address. Others publish generic names that encode the address, the city or the connection type, such as static, dsl or pool, which geolocation and VPN detection systems use as hints. A missing PTR is normal for most home and mobile users and is not a sign of anything wrong.

Check reverse DNS

Enter an IP address in the DNS lookup, or open it directly, such as /dns/1.1.1.1. The IP lookup pages and the API's hostname field show the PTR name too. From a terminal: dig -x 8.8.8.8 +short or nslookup 8.8.8.8.

[ FAQ ]

Frequently asked questions

How do I set up reverse DNS for my IP address?

Ask whoever controls the IP block. On cloud and VPS hosts there is usually a reverse DNS field in the control panel; for a business internet line, ask the ISP. Point it at a hostname that resolves back to the same IP.

Is a PTR record required?

Not for normal internet use. It matters mainly for mail servers, where a missing or generic PTR often causes mail to be rejected or marked as spam, and for services that verify crawlers or log hostnames.

Can an IP address have more than one PTR record?

Technically yes, but it is discouraged because many programs only read the first answer. Use one PTR per IP and point it to the main hostname.

Does reverse DNS show who is using an IP address?

Only the name the network operator chose to publish. It often shows the ISP or hosting company and sometimes a city code, but never a person.

Last updated · All articles · API docs