Dig Reverse DNS: How to Check PTR Records

Learn how to use dig reverse DNS to check PTR records for IPv4 and IPv6, troubleshoot email deliverability issues, and fix forward-confirmed reverse DNS

Published on

•

Updated

•

Dig Reverse DNS: How to Check PTR Records
Do not index
Do not index
A campaign can have valid SPF, DKIM, and DMARC and still place poorly when the sending IP has no usable reverse DNS. The technical marketer sees authenticated messages entering spam, replies falling, and transactional emails arriving late or not at all. A quick dig -x lookup may return a hostname, but that result alone doesn't prove the mail server is trustworthy.
The practical question is whether the PTR record, forward DNS, and SMTP identity form one consistent chain. This guide shows how to use dig reverse dns lookups for IPv4 and IPv6, how to validate forward-confirmed reverse DNS, where ownership of the fix sits, and how to monitor every sending IP with a deliverability workflow.
Table of Contents

Why Reverse DNS Decides Whether Your Emails Reach the Inbox

A technical marketer launches a carefully prepared campaign. SPF authorizes the email service provider, DKIM signatures validate, and DMARC reports show alignment. Yet messages still land in spam. The overlooked problem is often the IP-level identity presented by the outbound mail server.
Reverse DNS maps an IP address to a hostname through a PTR record. When a receiving server accepts an SMTP connection, it can look up the connecting IP and inspect the hostname associated with it. That hostname can then be checked forward, using an A or AAAA record, to determine whether it points back to the original IP.
This isn't a replacement for SPF, DKIM, or DMARC. It is an infrastructure trust signal that helps a receiving system decide whether the connecting server has a coherent identity. Gmail's bulk sender guidance states that every IP sending email to Gmail must have a valid PTR record, and that the PTR hostname must resolve back to the sending IP, as documented in this PTR requirements reference for email delivery.
A missing PTR can make an authenticated message look inconsistent at the connection layer. A mismatched PTR can create the same concern even when the domain's authentication records are correct. Mailbox providers may filter, defer, or reject mail before message content receives meaningful consideration, depending on their policies and the sender's broader reputation.
notion image

Why the signal matters operationally

PTR records aren't a recent add-on. Historical documentation on PTR records and reverse DNS traces the PTR resource record to RFC 1035 in 1987, with IPv4 reverse lookups using in-addr.arpa and IPv6 using ip6.arpa. The older IQUERY mechanism was retired in 2002, leaving PTR-based reverse lookup as the standard approach.
That history explains why reverse DNS appears in mail systems, logging, and network diagnostics. A public reverse-DNS sweep queried 3,702,258,432 routable IPv4 addresses and resolved 1,157,507,027 PTR records, equivalent to roughly 31.3% of the queried space, according to Internet-scale reverse DNS coverage data. PTR is widespread, but its absence remains common.
For inbox placement, the business effect is direct. A broken IP identity can reduce replies from outbound sequences, interrupt onboarding messages, and weaken confidence in a transactional system. Teams investigating deliverability should therefore treat reverse DNS as one layer of the full email deliverability framework, alongside authentication, reputation, blacklist status, and SMTP behavior.

Running Dig Reverse DNS Lookups for IPv4 and IPv6

The dig utility gives developers and technical marketers a direct view of DNS responses. The basic reverse lookup command is:
dig -x <IP>
For an IPv4 address, dig converts the address into the reverse namespace under in-addr.arpa. The operator usually doesn't need to construct that name manually. For IPv6, the same -x option handles the reverse query and uses the nibble-based ip6.arpa namespace.

The basic checks

Run the lookup against the actual IP that opened the outbound SMTP connection:
dig -x <IPv4-address>
dig -x <IPv6-address>
dig -x <IPv4-address> +short
dig -x <IPv6-address> +short
The +short form is useful for a fast check or a script. The full response is better for diagnosis because it shows the response status, queried name, answer, and authority information.
A typical successful response includes:
  • QUESTION SECTION: The reverse name queried, with record type PTR.
  • ANSWER SECTION: The hostname returned for the IP.
  • AUTHORITY SECTION: Relevant authority information when supplied by the responding server.
A response with NXDOMAIN indicates that the queried reverse name doesn't exist. SERVFAIL means the resolver couldn't complete the query, which can point to delegation, DNSSEC, or authoritative-server trouble. An empty answer isn't equivalent to a healthy result. It can mean the reverse name exists but has no PTR record.
Command
Purpose
Expected Output
dig -x <IPv4-address>
Inspect the complete IPv4 PTR response
A PTR hostname in the answer section
dig -x <IPv6-address>
Inspect the complete IPv6 PTR response
A PTR hostname in the answer section
dig -x <IP> +short
Return only the PTR value
A concise hostname, or no output
dig -x <IP> +trace
Follow delegation while debugging
Resolution path and the point of failure
dig @<resolver> -x <IP>
Compare resolver responses
Resolver-specific status and PTR result
A cloud or ESP address should be checked in exactly the same way as a dedicated datacenter address. The provider's brand doesn't make the record valid automatically.

Check the whole sending portfolio

A common audit mistake is checking only the primary IPv4 address. Production systems may use secondary IPv4 addresses, provider-managed pools, dedicated streams, or IPv6. Every active outbound address needs its own review because one misconfigured IP can affect only part of a campaign.
Use +trace when a provider says the PTR exists but public resolvers return NXDOMAIN or SERVFAIL. For a broader explanation of the underlying lookup process, use this IP lookup guide for PTR records. The fix depends on who controls the reverse zone, not who manages the sending domain.

Forward-Confirmed Reverse DNS and the Trust Chain

A PTR record that exists isn't necessarily a valid mail identity. Forward-confirmed reverse DNS, or FCrDNS, requires a three-part chain:
  1. The receiving server reverses the connecting IP and gets a hostname.
  1. The receiving server resolves that hostname forward.
  1. The original sending IP appears in the resulting A or AAAA records.
The commands make the logic visible:
dig -x <sending-IP> +short
dig <returned-hostname> A +short
dig <returned-hostname> AAAA +short
Suppose the reverse query returns mail.example.net. The forward queries must return the same connecting IPv4 or IPv6 address. If they return a different address, or return nothing, the chain fails.
notion image

What receivers compare

Mail systems can compare three visible identities:
  • Connecting IP: The network address opening the SMTP session.
  • PTR hostname: The name returned by reverse DNS.
  • Forward result: The address or addresses returned for that hostname.
The SMTP server's EHLO or HELO name should fit the same identity. A practical implementation pattern is one stable fully qualified domain name per sending IP, without trailing spaces or accidental formatting errors. Operational FCrDNS guidance also recommends revalidation after an IP migration or provider change.
A generic hostname can be technically resolvable and still provide weak context. A wildcard or shared configuration can point several addresses at a name that doesn't identify the actual sender. A PTR that points to mail.example.net while EHLO announces another unrelated hostname creates an additional inconsistency.

What FCrDNS doesn't prove

FCrDNS helps establish infrastructure consistency. It doesn't prove that a message is authenticated, wanted, accepted, or placed in the inbox. SPF still describes authorized senders, DKIM still protects message integrity and domain identity, and DMARC still governs alignment and policy.
That distinction answers a common troubleshooting question: “The reverse lookup returns a hostname, so why are emails still failing?” The hostname may not forward-resolve to the sending IP, may not match EHLO, or the domain may have separate SPF, DKIM, DMARC, blacklist, or reputation problems.

Troubleshooting Broken PTR Records and Mismatched Hostnames

A reverse-DNS audit should classify the failure before anyone edits DNS. The first question is simple: who owns the IP allocation? The IP holder, usually a hosting provider, ISP, cloud provider, or ESP, controls the reverse DNS zone. The domain registrar generally can't create or change the PTR.
Failure Mode
Dig Output Symptom
Root Cause
Fix Owner
Resolution Steps
Missing PTR
NXDOMAIN or empty answer
No reverse record for the IP
IP provider or ESP
Request a PTR, then verify publicly
Resolver failure
SERVFAIL
Delegation or authoritative DNS problem
IP provider or datacenter
Run +trace, escalate the failing delegation
Forward mismatch
PTR exists, A or AAAA omits the sending IP
Hostname and address are inconsistent
Sender and IP provider
Correct forward DNS or PTR, then retest
EHLO mismatch
PTR and forward DNS pass, SMTP identity differs
Mail server uses another hostname
Sender or ESP
Set EHLO to the stable PTR hostname
Generic hostname
PTR returns an ISP or pool-style name
Default provider naming remains active
IP provider or ESP
Request a sender-controlled FQDN where supported

A practical decision tree

Run:
dig -x <sending-IP> +short
If the result is empty or NXDOMAIN, contact the ESP, cloud provider, or datacenter that allocated the IP. Ask for a PTR hostname appropriate for production mail, then request confirmation that the reverse zone is publicly delegated.
If a hostname appears, run:
dig <returned-hostname> A +short
dig <returned-hostname> AAAA +short
If neither response contains the original address, the sender must correct the forward record when the hostname is under its control. If the provider owns the hostname, the provider must change the PTR or forward mapping.
Finally, inspect the SMTP banner and EHLO name. If it differs from the validated hostname, the mail administrator or ESP must change the SMTP identity. DNS changes may appear gradually through resolver caching, so verification should be repeated after the provider confirms completion. Provider-side PTR ownership guidance explains why a sender often has to submit the request rather than edit the record in a normal DNS dashboard.
Route 53 or Cloudflare can host forward A and AAAA records when the sender controls the domain. They don't generally grant control over the reverse zone for an IP allocated elsewhere. The right fix is therefore determined by IP ownership, not by which DNS interface the team uses.

Automating Reverse DNS Checks with mailX API and MCP

Manual dig checks work well during a single incident. They become fragile when a team operates multiple IPs, ESPs, domains, or IPv6 addresses. A sending portfolio should be checked before a campaign, after an infrastructure migration, and whenever a provider changes routing or allocation.
A useful automation pattern is:
  1. Collect every live outbound IPv4 and IPv6 address from ESP configuration, MTA logs, and infrastructure inventory.
  1. Query each address for PTR.
  1. Resolve every returned hostname forward.
  1. Compare the returned A and AAAA values with the original address.
  1. Compare the result with the SMTP EHLO identity.
  1. Alert on missing, changed, or mismatched results.
The exact API path, authentication method, and response schema depend on the deployed mailX integration. A conceptual request can look like this:
POST /check-ptr
{
  "ip": "<sending-IP>"
}
A diagnostic response can be represented as:
{
  "ip": "<sending-IP>",
  "ptr_record": "mail.example.com",
  "forward_confirmed": true,
  "smtp_hostname_match": true,
  "status": "valid"
}
The important output isn't a decorative score. It is the explanation of what failed and who needs to fix it. A daily check can catch a provider replacing an address, a reverse zone losing delegation, or a forward record being removed during a routine DNS change.

Adding AI agents safely

AI agents can send campaigns, monitor domains, and respond to infrastructure incidents, but they shouldn't send blindly. Before an agent launches a sequence, it can check PTR, SPF, DKIM, DMARC, MX, blacklist status, and SMTP connectivity through a live tool layer.
Teams can connect mailX through MCP for email deliverability, then allow an agent to retrieve structured findings during incident response. Results can feed a deliverability dashboard or an alerting system, while a human approves changes involving providers, DNS ownership, or sending volume.
This approach catches slow failures that a one-off terminal check misses. It also turns reverse DNS into a release check, not a forgotten setup task.

Common Reverse DNS Mistakes That Hurt Deliverability

A valid PTR doesn't guarantee inbox placement. It only helps a receiver evaluate whether the sending infrastructure presents a stable, internally consistent identity. Several assumptions repeatedly create avoidable failures.
  • Myth, any PTR is better than none: A generic ISP or shared-pool hostname can still look weak or unrelated to the sender. The practical correction is to validate the name, its forward result, and its relationship to EHLO.
  • Myth, only the primary IP matters: Rotations and provider pools can contain several outbound addresses. Every live IPv4 and IPv6 sender needs an individual PTR and FCrDNS check.
  • Myth, IPv6 reverse DNS is optional: IPv6 uses ip6.arpa, but the identity requirement doesn't disappear. An overlooked IPv6 path can create failures that won't appear in an IPv4-only audit.
  • Myth, PTR replaces SPF, DKIM, and DMARC: PTR validates IP-to-hostname consistency. SPF validates authorized sending infrastructure, DKIM authenticates message signing, and DMARC evaluates alignment and policy.
  • Myth, a record set once stays correct: IP migrations, provider changes, and recycled infrastructure can break a previously valid relationship. Recheck after every change and monitor continuously.
notion image
The wider lesson is that reverse DNS belongs in the same operational stack as authentication, reputation, blacklist monitoring, and SMTP diagnostics. A PTR check can't explain every spam-placement problem, but skipping it leaves a fundamental part of the sender identity unverified.
For teams that want less raw output and more direction, mailX runs live checks across PTR, SPF, DKIM, DMARC, BIMI, MX, SMTP and IMAP connectivity, blacklist status, and related DNS configuration. It returns plain-English explanations and remediation steps for humans, developers, and AI-driven workflows.
Use mailX to audit every outbound IPv4 and IPv6 address, validate PTR and forward-confirmed reverse DNS, and connect the result with the rest of the deliverability stack. Run the free live check before the next campaign or infrastructure change so the team can fix identity and DNS issues before they damage inbox placement.

Most senders lose 30–70% of their emails to spam without knowing it.

Get a free expert audit of your domain, email authentication, and infrastructure. Identify hidden issues and fix them fast.

Book Your Free Deliverability Audit