🔀 Reverse DNS Generator – PTR Record Builder for IPv4 & IPv6
Reverse DNS (rDNS) maps an IP address back to a hostname — the opposite of the familiar forward DNS lookup. This tool automates the creation of PTR records, the special DNS resource records that power reverse lookups. Whether you need a single PTR entry for a mail server, a reverse zone name for your BIND configuration, or a full zone file for an entire subnet, this generator handles all three scenarios in seconds.
🌐 What Is a PTR Record?
A PTR (Pointer) record lives in a special part of the DNS namespace:
- IPv4 addresses use the
in-addr.arpadomain. The four octets are reversed and appended:192.168.1.25→ owner name25.1.168.192.in-addr.arpa. - IPv6 addresses use the
ip6.arpadomain. The 128-bit address is expanded to 32 hex nibbles, reversed, and dot-separated:2001:db8::1→1.0.0.0…8.b.d.0.1.0.0.2.ip6.arpa.
PTR records are critical for email deliverability — most spam filters reject mail from servers whose sending IP has no matching PTR record. They also appear in security logs, traceroutes, and network diagnostics tools such as dig -x and nslookup.
🛠 How to Use This Tool
The generator has three focused tabs:
1. Single PTR Record
Enter one IPv4 or IPv6 address and its target hostname. The tool auto-detects the IP version, computes the arpa owner name, and outputs a complete PTR record line ready to paste into your zone file or registrar portal. For IPv6 addresses, an interactive nibble-expansion panel shows every transformation step.
2. Zone Name Lookup
Enter a CIDR block (e.g. 192.168.10.0/24) and get the correct in-addr.arpa zone name to use in your named.conf zone block. For prefixes shorter than /24, the tool applies RFC 2317 classless delegation notation (e.g. 128/26.10.0.192.in-addr.arpa).
3. BIND Zone File Generator
Provide a CIDR block and a hostname pattern using {n} as a placeholder (e.g. host{n}.dc.example.com.). The tool generates a complete, paste-ready BIND zone file including:
$ORIGINand$TTLdirectives- SOA record with auto-generated serial (YYYYMMDDNN format)
- NS record pointing to your name server
- PTR record for every usable host in the subnet
Download the output as a .zone file or copy it directly to clipboard.
📐 PTR Record Format Reference
| IP Address | PTR Owner Name | Example PTR Record |
|---|---|---|
192.168.1.25 | 25.1.168.192.in-addr.arpa. | 25.1.168.192.in-addr.arpa. 3600 IN PTR mail.example.com. |
10.0.0.1 | 1.0.0.10.in-addr.arpa. | 1.0.0.10.in-addr.arpa. 3600 IN PTR gw.corp. |
2001:db8::1 | 1.0.0.0…8.b.d.0.1.0.0.2.ip6.arpa. | [nibble reversed].ip6.arpa. 3600 IN PTR host.example.com. |
📂 Reverse Zone Names for CIDR Blocks
The correct zone name depends on the prefix length:
| Prefix | Example CIDR | Zone Name | Notes |
|---|---|---|---|
| /8 | 10.0.0.0/8 | 10.in-addr.arpa | Class A |
| /16 | 172.16.0.0/16 | 16.172.in-addr.arpa | Class B |
| /24 | 192.168.1.0/24 | 1.168.192.in-addr.arpa | Class C (standard) |
| /26 | 198.51.100.128/26 | 128/26.100.51.198.in-addr.arpa | RFC 2317 classless |
📧 Why Reverse DNS Matters for Email
Mail Transfer Agents (MTAs) and spam-filtering services such as Spamhaus routinely perform a forward-confirmed reverse DNS (FCrDNS) check: they look up the PTR record for the sending IP, then verify that the resulting hostname resolves back to the same IP via a forward A or AAAA lookup. Failing this check significantly increases the spam score of outgoing email and can lead to outright rejection by major providers like Gmail, Outlook, and Yahoo Mail.
Always ensure your mail server IP has a PTR record, that the PTR target hostname resolves back to the original IP, and that the hostname matches or relates to the domain used in the HELO/EHLO greeting.
🔢 IPv6 Nibble Reversal Explained
IPv6 PTR records require expanding the address to all 128 bits (32 hex digits), then reversing the digit order one nibble at a time. For 2001:db8::1:
- Expand:
20010db8000000000000000000000001 - Split into nibbles:
2 0 0 1 0 d b 8 … 0 0 0 1 - Reverse all 32 nibbles:
1 0 0 0 … 8 b d 0 1 0 0 2 - Dot-separated + suffix:
1.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.
The IPv6 tab in this tool shows every step of this expansion, making it easy to verify the output and understand how the ip6.arpa namespace works.
⚙️ BIND Zone File Tips
- Use a trailing dot on all FQDNs (e.g.
mail.example.com.) — without it, BIND appends the zone origin, producing incorrect names. - The serial number must be incremented every time you modify the zone file. The YYYYMMDDNN format (e.g.
2026052201) makes the edit date visible at a glance and allows up to 99 changes per day. - Choose a TTL appropriate for your change frequency:
3600(1 hour) is a safe default; use300(5 minutes) when planning changes, and increase to86400(24 hours) for stable infrastructure. - Test your reverse zone with
dig -x <IP>orhost <IP>after deploying to confirm PTR resolution.