Black Friday: 60% off yearly plans with code BF2026, until November 30. See the deal

Learn

PTR record and reverse DNS for email

A PTR record maps an IP address back to a hostname, stored under in-addr.arpa for IPv4. For email, the sending IP should have a PTR whose hostname resolves back to the same IP, which Gmail and Yahoo both require.

The short answer
  • IPv4 PTR lives at the reversed address under in-addr.arpa.
  • The owner of the IP, usually your host or ISP, controls it. Your domain DNS host usually cannot set it.
  • Gmail wants the PTR hostname to have an A or AAAA record pointing back to the same IP.
Try the dns lookupFree, live, no signup

What does a PTR record look like?

RFC 1035 example form, with a documentation IP
25.2.0.192.in-addr.arpa.  IN  PTR  mail.example.com.
mail.example.com.         IN  A    192.0.2.25
; forward-confirmed reverse DNS: the PTR name and the A record agree

What do Google and Yahoo require?

Reverse DNS rules from each provider
ProviderRule
GoogleSending domains or IPs need valid forward and reverse DNS. The IP must match the PTR hostname, and that hostname needs an A or AAAA record back to the same IP
YahooAll senders need valid forward and reverse DNS. Non-generic PTR records reflecting your domain are recommended

How do you set a PTR record for a mail server?

  1. 01

    Pick the hostname

    For example mail.example.com, with an A record pointing to the sending IP.

  2. 02

    Find who owns the IP

    The cloud or hosting provider that assigned it.

  3. 03

    Set reverse DNS in their panel or ticket

    Provider panels call it reverse DNS or rDNS. Steps are provider specific.

  4. 04

    Test both directions

    Look up the IP with the DNS lookup, then resolve the returned hostname back.

  5. 05

    Match your mail greeting

    The HELO or EHLO name should use that same hostname.

Using a mail service?

If a provider such as Google or a newsletter service sends from its own IPs, it manages the PTR records. PTR is your job only when you run your own mail server or have a dedicated IP.

What should a mail IP reverse DNS pass?

  • A PTR record exists for the sending IP
  • The PTR hostname is not a generic one built from the IP address
  • That hostname has an A or AAAA record pointing back to the same IP
  • The SMTP greeting (HELO or EHLO) uses the same hostname
  • IPv6 sending IPs have their own PTR under ip6.arpa

Who controls which part?

Reverse zone

The IP block owner, such as your cloud provider or ISP.

Forward A record

You, in your domain DNS.

Shared mail services

The service provider, because its IPs are not yours.

What breaks reverse DNS for mail?

  • The provider default PTR is a generic name built from the IP
  • The PTR hostname has no A record
  • The A record points to a different IP than the PTR
  • IPv6 is used for sending but only IPv4 has reverse DNS

Common questions

What is a PTR record?

A DNS record of type PTR that maps an IP address back to a domain name. It is the reverse of an A or AAAA record and is stored in the in-addr.arpa tree for IPv4, with the octets in reverse order.

Why do email servers check PTR records?

A valid reverse name suggests a managed server rather than a generic dynamic address. Google requires valid forward and reverse DNS, and Yahoo recommends a non-generic PTR record that reflects your domain.

Can I add a PTR record in my domain DNS?

Usually not. Reverse zones are delegated to the owner of the IP block, so your host or ISP must create it. Your own DNS zone only needs the matching A record.

What is forward-confirmed reverse DNS?

The IP resolves to a name by PTR, and that name resolves back to the same IP by A or AAAA. Google describes this requirement for sending IPs.

Do I need a PTR record for a website?

No. Web visitors never use reverse DNS. PTR matters mainly for mail servers and some network tools, where receivers check that the sending IP maps to a sensible hostname.

Watch your domains automatically

Aepto monitors expiry, DNS, SSL and uptime for every domain you own and alerts you when something changes. Free for 3 domains.