DNS · PTR
Reverse DNS (PTR) lookup
Reverse DNS turns an IP back into a hostname — useful for log analysis, mail server reputation checks, and identifying server origins. Stored as PTR records under `<reversed-ip>.in-addr.arpa`.
intermediate
PTR
How to look it up
Four ways to query — pick by what's available on your machine.
dig (-x)dig -x 8.8.8.8 +short
dig (manual)dig PTR 8.8.8.8.in-addr.arpa +short
hosthost 8.8.8.8
dotdigdotdig ptr 8.8.8.8
Sample response
dns.google.
Format
PTR records live under `<reversed-octets>.in-addr.arpa` (IPv4) or `<reversed-nibbles>.ip6.arpa` (IPv6). The `-x` shortcut handles the reversal automatically.
Common pitfalls
- Reverse DNS is OPTIONAL — many IPs have no PTR. Mail servers requiring 'verified RDNS' will reject mail from such IPs.
- PTR is provisioned by the IP block owner (your ISP / cloud provider), NOT you. AWS lets you set custom PTR via a support ticket; most home ISPs don't.
- Forward-confirmed reverse DNS (FCrDNS): mail servers check that `IP → PTR → A` round-trips. If `1.2.3.4 → mail.example.com → 5.6.7.8`, it fails. Configure both directions to match.
Why it matters for security
security relevance
Mail anti-spam systems treat hosts without proper RDNS as suspicious — they assume real mail servers have PTR. Audit your sending IP's PTR before launching.
Use cases
- Mail server reputation setup
- Log analysis (what hostname is this IP?)
- Diagnose 'mail rejected for missing RDNS'
- Identifying scanner / attacker infrastructure
Look up DNS without flag soup
dotdig is a friendly DNS resolver — formatted output, custom resolver support, DNSSEC validation. Zero-config alternative to dig.
Open dotdig