{
  "id": "reverse-dns-lookup",
  "title": "Reverse DNS lookup",
  "lang": "en",
  "source_lang": "en",
  "summary": "Reverse DNS lookup queries the Domain Name System to find domain names associated with an IP address, usually through PTR records.",
  "category": "computer-science",
  "subcategory": "networks-security",
  "type": "concept",
  "aliases": [
    "Reverse DNS resolution",
    "Reverse lookup",
    "rDNS lookup"
  ],
  "generated_at": "2026-11-05",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/reverse-dns-lookup/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/reverse-dns-lookup/",
      "json": "https://aiwiki.page/zh/reverse-dns-lookup.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "Reverse DNS lookup is the process of querying the Domain Name System (DNS) for a domain name associated with an IP address. Whereas a forward DNS lookup commonly translates a name into an address using an A or AAAA record, a reverse lookup usually retrieves a PTR record from a specially organized DNS namespace. Reverse DNS supports network diagnostics, readable logs, and some email filtering practices, but does not by itself establish a host’s identity or trustworthiness."
    },
    {
      "heading": "Naming and record structure",
      "text": "Reverse DNS does not search all forward DNS records for names containing a particular address. Instead, it uses a separate hierarchy in which an address is encoded as a DNS name:\n\n- IPv4 addresses use the in-addr.arpa domain.\n- IPv6 addresses use the ip6.arpa domain.\n\nA PTR record, short for pointer record, associates a name in this hierarchy with a target domain name. The address components are reversed because DNS delegation proceeds from right to left, while network addresses are conventionally written with their most significant components first. Reversing the address places the broader network prefix nearer the root of the reverse namespace.\n\nForward and reverse mappings are maintained independently. Creating an A or AAAA record does not automatically create a PTR record, and creating a PTR record does not automatically create a corresponding forward record. Management software may coordinate them, but DNS itself does not enforce that coordination.\n\nIPv4\n\nFor an IPv4 address, the four decimal octets are reversed and followed by in-addr.arpa. For example, the reverse lookup name for 192.0.2.25 is:\n\n25.2.0.192.in-addr.arpa.\n\nAn illustrative record is:\n\n25.2.0.192.in-addr.arpa.  3600  IN  PTR  mail.example.com.\n\nHere, 3600 is the record’s time to live in seconds, IN identifies the Internet class, and mail.example.com. is the target name. The trailing dot marks an absolute domain name.\n\nThe address and domain in this example are reserved for documentation.\n\nIPv6\n\nFor an IPv6 address, the full 128-bit address is expanded into 32 hexadecimal digits. Each digit represents four bits, or a nibble. The digits are reversed, separated by dots, and followed by ip6.arpa.\n\nFor example, 2001:db8::1 expands to:\n\n20010db8000000000000000000000001\n\nIts reverse lookup name is:\n\n1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.\n\nEach hexadecimal digit is a separate DNS label. This structure supports delegation at four-bit boundaries."
    },
    {
      "heading": "How resolution works",
      "text": "An application typically asks a DNS resolver to perform the lookup. The resolver constructs the appropriate reverse name and requests its PTR records. If a suitable answer is not cached, resolution follows DNS referrals through the reverse hierarchy until an authoritative server supplies an answer or reports that the requested data does not exist.\n\nThe result can include:\n\n- One PTR record naming the address.\n- Multiple PTR records naming the same address.\n- An indication that the queried name does not exist, commonly reported as NXDOMAIN.\n- A successful DNS response containing no PTR records for an existing name, often called a NODATA result.\n- A temporary failure, such as a timeout, unreachable server, or server error.\n\nThese outcomes are not equivalent. Missing reverse data does not mean that an address is unreachable, and a DNS timeout does not establish that no PTR record exists.\n\nDNS caching applies to reverse lookups as it does to forward lookups. Positive answers remain cached according to their time to live; negative answers can also be cached. Consequently, changes may not become visible to every client immediately.\n\nApplications may use an operating system name-resolution interface rather than directly issuing a DNS query. Such interfaces can consult local configuration or other naming services, so a displayed address-to-name result is not always evidence of a public DNS PTR record."
    },
    {
      "heading": "Administration and delegation",
      "text": "Reverse DNS is normally controlled through the organization responsible for an address allocation, such as an Internet service provider, hosting company, or network operator. This differs from forward DNS, which is controlled through the delegation of a domain name.\n\nFor example, control of example.com permits its administrator to publish an A record pointing to a server’s address, but does not necessarily permit that administrator to change the address’s PTR record. The address provider may offer a control panel, an API, a support process, or delegation of a reverse zone.\n\nClassless IPv4 delegation\n\nThe IPv4 reverse hierarchy naturally aligns with octet boundaries. A zone such as 2.0.192.in-addr.arpa corresponds to the addresses in 192.0.2.0/24. Allocations smaller than this do not fit directly into the same label structure.\n\nRFC 2317 describes a widely used classless delegation method: the parent reverse zone publishes CNAME aliases that redirect individual reverse names into a separately delegated zone. This allows the recipient of a smaller address block to manage its PTR records without administering the entire parent zone.\n\nThe method complements Classless Inter-Domain Routing rather than changing how ordinary PTR queries are made.\n\nPrivate and local addressing\n\nPrivate address spaces can have reverse records within an organization’s own DNS infrastructure. Because these addresses are reused across unrelated networks, their reverse data is not a globally unique public directory.\n\nInternal resolvers may serve local reverse zones, and DNS standards specify locally served zones for several special-use address ranges. Split DNS configurations can therefore return different answers depending on the querying client’s network or resolver."
    },
    {
      "heading": "Uses",
      "text": "Network diagnostics and logging\n\nDiagnostic programs such as traceroute can display reverse-resolved names alongside addresses. Administratively chosen names may indicate a device’s role, provider, or location. Such information is descriptive rather than authoritative: naming conventions can be incomplete or outdated.\n\nServers and monitoring systems may also resolve addresses to make logs easier to interpret. Because DNS resolution introduces latency and possible failures, some systems retain numeric addresses and perform name resolution separately.\n\nEmail handling\n\nReceiving email servers often examine the reverse DNS of a connecting mail server as one input to spam and abuse controls. Some also test whether the returned name resolves forward to the connecting address.\n\nMissing or inconsistent reverse DNS can affect acceptance under a recipient’s local policy. However, a valid PTR record does not establish that a message is legitimate, that its claimed sender is authorized, or that its contents are safe. Reverse DNS is distinct from email authentication mechanisms such as SPF, DKIM, and DMARC.\n\nOperational identification\n\nReverse names can help operators distinguish servers, identify infrastructure, and investigate traffic. An address shared by many websites or users may nevertheless have only a provider-assigned reverse name. Reverse DNS is therefore not a complete inventory of the services using an address."
    },
    {
      "heading": "Forward-confirmed reverse DNS",
      "text": "Forward-confirmed reverse DNS (FCrDNS) checks consistency between reverse and forward mappings:\n\n- Query the address’s PTR records.\n- Resolve a returned name using A records for IPv4 or AAAA records for IPv6.\n- Check whether the resulting address set includes the original address.\n\nIf a name passes this test, its reverse and forward records agree for that address. Implementations can differ in how they handle multiple PTR records or partial failures.\n\nFCrDNS provides a stronger consistency check than a PTR lookup alone, but is not a substitute for authentication. An operator controlling both an address’s reverse mapping and a domain’s forward records can configure a matching pair without establishing any broader claim about identity or reputation."
    },
    {
      "heading": "Limitations and security",
      "text": "Reverse DNS is not a mathematical inverse of forward DNS. Many names can resolve to one address, a name can resolve to multiple addresses, and an address can have no PTR record or several. Neither hierarchy is required to enumerate the other completely.\n\nImportant limitations include:\n\n- Untrusted labels: PTR targets are assertions made by the reverse-zone administrator. A target name alone does not demonstrate control of the named domain.\n- Stale data: Address reassignment or configuration changes can leave outdated records.\n- Availability dependencies: Synchronous reverse lookups can delay applications when DNS is slow or unavailable.\n- Information exposure: Descriptive names can reveal internal conventions or infrastructure roles.\n- Weak access-control evidence: Hostname-based authorization can be unsafe if it treats reverse names as verified identities.\n\nDNS Security Extensions can authenticate signed DNS data and protect against certain forms of DNS forgery. They do not establish that a PTR target accurately describes a machine, that an operator is trustworthy, or that forward and reverse records agree."
    },
    {
      "heading": "Tools and standards",
      "text": "Common command-line tools include:\n\ndig -x 192.0.2.25\nnslookup 192.0.2.25\nhost 192.0.2.25\n\nThe -x option tells dig to construct the reverse lookup name. A PTR query can also be issued explicitly:\n\ndig PTR 25.2.0.192.in-addr.arpa.\n\nThe modern DNS framework and IPv4 reverse namespace are described in RFC 1034 and RFC 1035, published in 1987. IPv6 reverse naming under ip6.arpa is specified in RFC 3596. The older IPv6 reverse domain ip6.int was deprecated by RFC 4159.\n\nOrdinary reverse DNS should not be confused with the historical DNS inverse query operation, or IQUERY. IQUERY was a separate protocol operation, later made obsolete by RFC 3425; modern reverse lookups use normal DNS queries directed at the reverse namespace."
    }
  ],
  "links": [
    "domain-name-system",
    "operating-system",
    "email",
    "authentication"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}