Skip to main content

Reverse DNS API

free
GET/v1/ip/reverse

Performs a reverse DNS lookup (PTR record query) to find the hostname(s) associated with an IP address. Validates forward-confirmed reverse DNS (FCrDNS) for up to 10 PTR hostnames, classifies detected hostname patterns, and returns a single-word `email_deliverability` verdict (pass / warn_generic / warn_no_fcrdns / fail_no_ptr) that compresses the FCrDNS + generic-hostname + PTR-presence signals into one actionable field. Essential for email deliverability validation and infrastructure reconnaissance.

What It Does

Queries PTR records for the IP address by looking up the in-addr.arpa (IPv4) or ip6.arpa (IPv6) domain via Cloudflare DoH. Returns all associated hostnames, performs forward-confirmed reverse DNS (FCrDNS) validation by resolving up to 10 PTR hostnames back to verify they match the original IP (with `fcrdns_truncated` / `fcrdns_total` so callers know when more PTRs existed than were checked), classifies detected hostname patterns (mail servers, CDNs, residential ISP naming, cloud compute), and produces an `email_deliverability` rollup combining FCrDNS pass/fail, generic-hostname detection, and PTR presence into a single recommendation.

Why It's Useful

Reverse DNS is critical for email deliverability since Google and Yahoo require Forward-Confirmed Reverse DNS (FCrDNS) as of February 2024. The bundled `email_deliverability.recommendation` field collapses the raw signals into a verdict every mail-ops engineer carries in their head, so a quick health check no longer requires custom client-side logic. It enables security analysts to resolve IPs in logs to meaningful hostnames, and penetration testers to discover infrastructure during reconnaissance. Missing or misconfigured PTR records are a leading cause of email delivery failures.

Use Cases

Email Administrator

Email Deliverability Audit

Verify that all mail server IPs have proper PTR records matching the HELO/EHLO hostname, and that FCrDNS passes. Required by Google and Yahoo since February 2024.

Prevent email delivery failures caused by missing or mismatched reverse DNS records.

SOC Analyst

Security Log Enrichment

Enrich firewall, IDS, and server access logs with hostnames to identify patterns like scanning from cloud providers or known botnet infrastructure.

Transform raw IP logs into actionable intelligence with meaningful hostname context.

Penetration Tester

Infrastructure Reconnaissance

Map IP ranges to hostnames during authorized penetration testing to discover additional subdomains, services, and shared hosting environments.

Expand attack surface understanding by uncovering hidden services and infrastructure relationships.

Parameters

NameLocationTypeRequiredDescription
ipquerystringRequiredThe IPv4 or IPv6 address to perform reverse DNS lookup onExample: 8.8.8.8

Response Fields

Result fields below are inside the JSON data object. Any row named meta describes the sibling response metadata object. See response and error handling for status codes and error responses. Optional observations may be absent or null; inspect warnings and partial-failure fields before treating a missing result as a negative finding.

FieldTypeDescription
ipstringThe queried IP address
ip_versionnumberIP version (4 or 6)
hostnamesarrayAll PTR record hostnames found (trailing dots removed)
has_ptrbooleanWhether any PTR record was found
fcrdnsarrayForward-confirmed reverse DNS results: hostname, forward_confirmed (boolean), forward_addresses. Capped at 10 hostnames.
fcrdns_truncatedbooleanTrue when the FCrDNS check ran against a subset of `hostnames` (i.e. >10 PTRs)
fcrdns_totalnumberTotal number of PTR hostnames returned (whether or not all were FCrDNS-checked)
hostname_classificationstringDetected hostname pattern: mail_server, nameserver, cdn, web_server, gateway, residential, static_ip, or cloud_compute
email_deliverability.fcrdns_passbooleanTrue when at least one PTR forward-resolves to this IP
email_deliverability.generic_hostnamebooleanTrue when PTR matches a residential / dynamic-ISP pattern — mail from this IP typically fails RBLs
email_deliverability.missing_ptrbooleanTrue when no PTR record exists — most receivers will reject mail from this IP
email_deliverability.recommendationstringSingle-word verdict: pass, warn_generic, warn_no_fcrdns, or fail_no_ptr
is_bogonbooleanWhether the input is in a bogon/reserved address range.
dnssec_validatedbooleanResolver validation signal for the PTR result.

Code Examples

Replace YOUR_API_KEY with your API key. This endpoint requires the free plan or higher; see plans and usage limits.

cURL
curl --request GET 'https://api.edgedns.dev/v1/ip/reverse?ip=8.8.8.8' \
  --header "Authorization: Bearer YOUR_API_KEY"
JavaScript
const response = await fetch(
  "https://api.edgedns.dev/v1/ip/reverse?ip=8.8.8.8",
  {
    "method": "GET",
    "headers": {
      "Authorization": "Bearer YOUR_API_KEY"
    }
  }
);

if (!response.ok) {
  throw new Error(`EdgeDNS returned HTTP ${response.status}`);
}
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    'GET',
    "https://api.edgedns.dev/v1/ip/reverse?ip=8.8.8.8",
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    timeout=60,
)
response.raise_for_status()
data = response.json()
print(data)

Read the full Reverse DNS guide

Learn the concepts, choose a practical workflow, and interpret the observations from Reverse DNS before acting on them. Run supported checks via MCP or through REST.

Read the guide →

    Related Endpoints

    External References

    Learn more about the standards and protocols behind this endpoint.

    Try This Endpoint

    Test the Reverse DNS endpoint live in the playground.

    Reverse DNS API Reference | EdgeDNS