Reverse DNS (PTR) & Hostname Lookup
Resolve PTR hostnames for any IPv4/IPv6 address or A/AAAA records for any domain — enriched with city, ASN, and 12 security signals.
DNS Records
Enriched IP Geolocation & Security Flags
| IP Address | Location | ASN & Network | Security Flags |
|---|
GET /v1/dns?q={ip_or_domain}
How Reverse DNS (in-addr.arpa & ip6.arpa) Resolution Works
Byte & Nibble Reversal Under ARPA Zones
Unlike forward DNS (example.com → A/AAAA), reverse DNS walks the delegation tree from least-specific network prefix to host inside special ARPA trees managed alongside RIR IP delegations:
- IPv4 PTR Zone: reverse the four dotted octets and append
.in-addr.arpa(for example,8.8.8.8queries8.8.8.8.in-addr.arpa, and198.51.100.42queries42.100.51.198.in-addr.arpa). - IPv6 PTR Zone: expand all zero-compressed groups to 32 hexadecimal digits, reverse every nibble separated by dots, and append
.ip6.arpa. - Classless Delegation (RFC 2317): subnets smaller than a
/24use CNAME pointers inside the parent/24zone so customer organizations can manage their own reverse DNS.
Forward-Confirmed Reverse DNS (FCrDNS) & Deliverability
Email providers, SSH bastions, and anti-abuse gateways routinely test Forward-Confirmed Reverse DNS before accepting traffic from an unknown host:
- Step 1 (IP → PTR): resolve the connecting socket IP to its PTR hostname (for example,
mail1.example.com). - Step 2 (PTR → A/AAAA): resolve that hostname forward and confirm the original IP appears in the returned address set.
- Operational Value: matching FCrDNS proves the operator controls both the domain zone and the IP delegation's reverse zone, drastically cutting false positives in mail and bot filtering alongside our IP Reputation Checker.
Decoding Infrastructure & City Hints in PTR Hostnames
Because core routers and subscriber Broadband Network Gateways (BNGs) sit near physical customer access points, PTR naming templates frequently expose network role and physical metro topology even when public WHOIS shows a corporate headquarters address:
| PTR Hostname Pattern | Network Role | Typical Signals Present | Lookup Next Step |
|---|---|---|---|
cpe-74-125-xx-xx.nycap.res.rr.com |
Residential Dynamic Pool | Region slug (nycap), pool type (res/dsl/ftth) |
Verify metro centroid via IP Lookup |
ae12.cr1-iad1.backbone.net |
Core / Edge Router Interface | Airport IATA code (iad), POP index, interface speed (ae/xe/et) |
Inspect ASN Lookup peering scope |
64-12.nycny83w01.isp.net |
Telecom Exchange / DSLAM | 8-character CLLI wire-center code (NYCNY83W) |
Check delegated block in IP WHOIS |
dns.google · one.one.one.one |
Global Anycast Resolver | Named service alias + is_anycast security flag |
Traffic terminates at nearest BGP PoP |
ec2-54-xx.compute-1.amazonaws.com |
Cloud Compute Instance | Cloud region slug (compute-1 = us-east-1) + is_cloud |
Inspect flags in VPN / Cloud Check |
CLI & API Recipes for Automated PTR Enrichment
REST API & Terminal dig -x
# Passive PTR + Geo + 12 Security Flags via IPDatum curl -s "https://api.ipdatum.com/v1/dns?q=8.8.8.8" | jq . # Forward A/AAAA + per-IP security enrichment curl -s "https://api.ipdatum.com/v1/dns?q=github.com" # Standard local DNS PTR check dig +short -x 2001:4860:4860::8888
Python FCrDNS Audit Snippet
import urllib.request, json
ip = "8.8.8.8"
ptr_res = json.load(urllib.request.urlopen(
f"https://api.ipdatum.com/v1/dns?q={ip}"))
hostnames = ptr_res.get("records", [])
print("PTR:", hostnames, "IP Intel:", ptr_res.get("ips"))
Global IPv4 Infrastructure Share & Reverse DNS (PTR) Naming Patterns
Reverse DNS hostnames reveal network role, cloud region, and ISP POP topology at a glance. Below is the global distribution of routed IPv4 space across 8 infrastructure types plus FCrDNS expectations:
network_type | Share of Routed IPv4 | Typical Reverse DNS (PTR) Pattern | FCrDNS & Geo Signal |
|---|---|---|---|
fixed | 89.25% | *.hsd1.*.comcast.net, *.res.rr.com | Often encodes ISP POP/city tokens |
mobile | 5.15% | *.mobile.*, generic numeric ISP hostnames | Usually missing or static carrier pool |
relay | 0.01% | *.mask.apple-dns.net, masked privacy relay hosts | FCrDNS passes to relay operator |
hosting | 0.25% | mail.*.example.com, customer-set rDNS | Required for SMTP deliverability |
cloud | 4.85% | ec2-*.compute.amazonaws.com | Default cloud PTR encodes region |
anycast | 0.41% | dns.google, one.one.one.one | Matches global service brand |
satellite | 0.08% | customer.*.starlinkisp.net | Matches ground-station POP metro |
ixp | 0.01% | *.ix.de-cix.net, *.equinix.com | Encodes IXP metro & switch port |
Forward-Confirmed Reverse DNS (FCrDNS) Expectations by Host Role
| Host Role | Expected PTR ↔ A/AAAA Behavior | Email / Anti-Spam Impact | Best Practice |
|---|---|---|---|
| Dedicated Outbound Mail Server | PTR resolves to mail.domain.com → A/AAAA resolves back to exact IP | Strict PASS required by Gmail/Microsoft SPF+DMARC | Set dedicated rDNS matching HELO banner |
| Hyperscale Cloud VM / API | Default provider hostname (e.g., AWS ec2-x-x-x-x.compute) | Acceptable for APIs; rejected by strict mail servers | Configure custom PTR via cloud console before SMTP |
| Residential Broadband / Fiber | ISP-assigned dynamic hostname encoding gateway POP or city | Blocked on direct port 25 by ISP & Spamhaus PBL | Relay outbound email via authenticated SMTP |
| Consumer Carrier CGNAT | Shared carrier gateway PTR or NXDOMAIN | Not suitable for hosting public services | Identify origin traffic via app-layer auth |
Frequently Asked Questions
What does a Reverse DNS (PTR) lookup return?
Reverse DNS resolves an IP address back to its registered hostname via in-addr.arpa (IPv4) or ip6.arpa (IPv6) PTR records. Network operators often encode city names, router POP codes, or residential ISP pool names in PTR records, and IPDatum enriches each resolved IP with geolocation, ASN ownership, and 12 security flags.
How do you format an IPv4 or IPv6 address for a PTR DNS query?
IPv4 reverses the four octets under .in-addr.arpa (for example, 8.8.4.4 becomes 4.4.8.8.in-addr.arpa). IPv6 expands every zero-compressed group to all 32 hex digits, reverses every nibble separated by dots, and appends .ip6.arpa. This page handles both transformations automatically.
What is Forward-Confirmed Reverse DNS (FCrDNS) and why does it matter?
FCrDNS checks that resolving an IP's PTR hostname and then resolving that hostname's forward A or AAAA records returns the exact original IP address. Mail servers and fraud engines treat valid FCrDNS as baseline proof of proper host administration.
Why do many residential or cloud IPs return no PTR record?
Many mobile carrier CGNAT gateways, dynamic residential IPv6 blocks, and unconfigured cloud instances have no PTR zone delegated or return empty NXDOMAIN responses. In those cases, IPDatum still returns full ASN, WHOIS, geolocation, and threat metadata.
How do operators encode city locations in router PTR hostnames?
Transit providers and regional ISPs routinely include three-letter IATA airport codes (iad, ord, fra, nrt), telecom CLLI wire-center identifiers, or abbreviated city labels so NOC engineers can trace physical paths rapidly.