Skip to main content

Reverse DNS

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) and detects hostname patterns. 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 each PTR hostname back to verify it matches the original IP, and classifies detected hostname patterns (e.g., mail servers, CDNs, residential ISP naming conventions).

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. 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

NameTypeRequiredDescription
ipstringRequiredThe IPv4 or IPv6 address to perform reverse DNS lookup onExample: 8.8.8.8

Response Fields

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
hostname_classificationstringDetected hostname pattern: mail_server, nameserver, cdn, web_server, gateway, residential, static_ip, or cloud_compute

Code Examples

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

const data = await response.json();
console.log(data);
Python
import requests

response = requests.get(
    'https://api.edgedns.dev/v1/ip/reverse',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    params={
    'ip': '8.8.8.8'
    }
)

data = response.json()
print(data)

Read the full Reverse DNS guide

Why it matters, real-world use cases, parameters, response fields, and how to call it from Claude, ChatGPT, or Gemini via MCP.

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.