What is reverse DNS?
Reverse DNS maps an IP address back to a hostname, the opposite of a normal lookup. The answer is a PTR record stored under a special name in the in-addr.arpa (IPv4) or ip6.arpa (IPv6) zone. It is controlled by whoever owns the IP block — usually your hosting provider or ISP — not by your domain's DNS.
What the PTR lookup shows
| Field | Meaning |
|---|---|
| PTR name | The hostname the IP's owner published for it. |
| Resolves to | The A or AAAA records of that hostname, looked up forward. |
| Forward-confirmed (✓) | The hostname resolves back to the IP you entered — FCrDNS. Mail receivers check this. |
| arpa name | Where the PTR record lives, for example 8.8.8.8.in-addr.arpa. |
The tool also flags names that look auto-generated, such as 203-0-113-7.dynamic.isp.net. Spam filters often treat those as home connections that should not send mail directly.
Why reverse DNS matters for email
Gmail and Yahoo require every sending IP to have a PTR record whose hostname resolves back to the same IP. Microsoft recommends it, and many smaller providers reject mail outright without it. A mismatch is one of the most common reasons a self-hosted mail server's messages bounce or land in spam.
- Set the PTR to the hostname your mail server announces in its SMTP greeting (HELO/EHLO), for example
mail.example.com. - Create a matching A (and AAAA) record for that hostname pointing at the same IP.
- Run this reverse DNS lookup again: the result should show ✓ forward-confirmed.
For the full list of what Gmail, Yahoo and Outlook expect, run the email sender requirements checker.
How to set a PTR record
You cannot add a PTR record in your domain's DNS zone, because reverse zones belong to the IP owner. Set it where the IP comes from:
| Where your IP comes from | Where to set reverse DNS |
|---|---|
| AWS EC2 (Elastic IP) | EC2 console → Elastic IPs → Update reverse DNS (the A record must exist first) |
| Google Cloud | VM instance → Edit → Network interfaces → Public DNS PTR record |
| Azure | Public IP address → Configuration → DNS name label and reverse FQDN |
| DigitalOcean, Hetzner, Linode, Vultr | Name the server (or set rDNS) in the control panel |
| Home or office ISP | Ask the ISP; most only set custom PTRs on static business IPs |
| Your own IP block (ARIN, RIPE, APNIC) | Delegate the reverse zone to your name servers and publish PTRs there |
; reverse zone for 198.51.100.0/24
7.100.51.198.in-addr.arpa. PTR mail.example.com.
; forward record in example.com
mail.example.com. A 198.51.100.7Reverse DNS lookup from the command line
$ dig -x 8.8.8.8 +short
dns.google.
$ nslookup 8.8.8.8
$ host 2001:4860:4860::8888Other uses of reverse DNS
- Logs and traceroutes show readable names instead of bare IPs, often revealing the provider and location of each hop.
- Security reviews use PTR names to spot which cloud or hosting provider an address belongs to.
- SSH and some FTP servers look up the client's PTR, which can slow logins when reverse DNS is missing.
A DNS lookup does the forward direction for a hostname: A, AAAA, MX, TXT and the rest in one view.