Reverse DNS Generator

Turn an IP or a whole prefix into PTR names, a zone file and an RFC 2317 delegation block.

The Reverse DNS Generator runs entirely in your browser. Addresses and host names you enter are turned into records on your device and never uploaded — no DNS queries are made.

Built and maintained by Udit Agarwal

Open the CIDR Subnet Calculator

About Reverse DNS Generator

Reverse lookups live in two special trees. An IPv4 address reverses its octets under in-addr.arpa, so 192.0.2.15 becomes 15.2.0.192.in-addr.arpa; an IPv6 address reverses every single nibble under ip6.arpa, producing the 32-label names nobody types by hand. This tool builds those names for one address or an entire prefix, writes a zone file with an SOA and a PTR per host from a naming pattern, and handles the case that catches hosting customers out — a block smaller than a /24 cannot own a reverse zone at all, and has to be delegated with the CNAME arrangement described in RFC 2317.

Features

  • PTR names for IPv4 and IPv6, picked automatically from the address
  • Full nibble expansion for ip6.arpa, including compressed :: notation
  • Every reverse zone a prefix touches, listed for prefixes shorter than /24
  • PTR records for a whole range from a hostname pattern
  • Patterns with the last octet, the dashed address or a running index
  • Complete BIND zone file with SOA, NS and one PTR per address
  • RFC 2317 CNAME delegation block for prefixes longer than /24
  • Downloadable record list and zone file

How to use the Reverse DNS Generator

  1. Enter a single IP to see its PTR name, or a CIDR prefix for a whole block
  2. Set a hostname pattern such as host-{last}.example.com
  3. Copy the PTR records, or switch to zone mode for a complete zone file
  4. For a prefix longer than /24, hand the delegation block to your provider

Example

Input

192.0.2.0/29

Output

0.2.0.192.in-addr.arpa. IN PTR host-0.example.com.
1.2.0.192.in-addr.arpa. IN PTR host-1.example.com.
…

A /29 sits inside someone else's /24, so it is delegated with CNAMEs rather than given a zone of its own.

Common errors & troubleshooting

  • Mail from a server keeps landing in spam. — Check that the sending IP has a PTR record and that the name it returns resolves back to the same address. Several large receivers reject or heavily penalise mail from IPs with no matching reverse record.
  • The provider says they cannot delegate a /28. — They can, but not as a normal zone. Prefixes longer than /24 are delegated with the RFC 2317 CNAME arrangement generated here — the provider adds the CNAMEs, you host the sub-zone.
  • An ip6.arpa name looks impossibly long. — It should. IPv6 reverses one label per hex nibble, so a full address produces 32 labels. That is why IPv6 reverse zones are delegated at a nibble boundary and populated only for addresses actually in use.

Frequently asked questions

What is a PTR record?
The DNS record that maps an IP address back to a host name. It lives in the in-addr.arpa tree for IPv4 or ip6.arpa for IPv6, and it is what a reverse lookup such as dig -x returns.
How is an in-addr.arpa name built?
Reverse the four octets and append in-addr.arpa. The address 192.0.2.15 becomes 15.2.0.192.in-addr.arpa, because DNS reads names from the most specific label leftwards.
Why does reverse DNS matter for email?
Receiving mail servers use it as a basic sanity check on the sending host. An IP with no PTR, or one whose PTR does not resolve forward to the same address, is treated as more likely to be a compromised machine than a real mail server.
Can I set reverse DNS myself?
Only if you control the address block. Reverse zones are delegated by whoever holds the IP allocation, so for a single server it is normally set through your hosting provider's control panel rather than in your own DNS.
What is RFC 2317 delegation?
A convention for delegating reverse DNS for a block smaller than a /24. The parent zone publishes CNAMEs pointing each address into a sub-zone whose name encodes the range, and the customer hosts the PTR records in that sub-zone.

Related tools

  • CIDR / Subnet Calculator — Calculate network, broadcast, host range and mask from a CIDR block.
  • IPv6 ↔ IPv4 Converter — Convert between IPv4 and IPv6 (mapped/expanded/compressed) and extract embedded IPv4.
  • IP Range to CIDR — Convert a start and end IP address into the minimal set of CIDR blocks, and back.
  • DKIM Record Generator — Build and inspect the DKIM TXT record that publishes your mail signing key.
  • SPF Record Generator — Build and validate the SPF TXT record that stops others sending mail as your domain.
  • MTU & MSS Calculator — Work out TCP MSS from an MTU, allowing for IPv6, tunnels and TCP options.

Guides

More Network tools

  • CAA Record Generator — Build the DNS record that names which certificate authorities may issue for your domain.
  • SRV Record Generator — Build and decode SRV records for SIP, XMPP, Minecraft, LDAP and Autodiscover.
  • WHOIS Record Parser — Turn a raw WHOIS response into dates, registrar, name servers and decoded status codes.
  • Subnet Splitter — Split a CIDR block into equal subnets or size them by host count with VLSM.
  • DNS TXT Record Splitter — Split a long TXT value into 255-byte strings for DKIM, SPF and verification.
  • P2P File Transfer — Send files straight from one browser to another over a direct connection.
  • Email Domain Health Check — Paste your MX, SPF, DKIM and DMARC records for a scored deliverability report with fixes.
  • CIDR / Subnet Calculator — Calculate network, broadcast, host range and mask from a CIDR block.
  • IPv6 ↔ IPv4 Converter — Convert between IPv4 and IPv6 (mapped/expanded/compressed) and extract embedded IPv4.
  • User Agent Parser — Parse a User-Agent string into browser, engine, operating system and device, in your browser.
  • HAR File Viewer — Open a HAR file and inspect the request waterfall, headers, timings and sizes, in your browser.
  • IP Range to CIDR — Convert a start and end IP address into the minimal set of CIDR blocks, and back.

See all Network tools (24) · All tools