Cloudflare hosts your forward zone — the mapping from example.com to IPs. Reverse DNS runs the other way, from an IP back to a hostname, and it lives in a completely different tree (in-addr.arpa) whose authority follows IP ownership, not domain ownership. Your hosting provider owns your server’s IP, so the PTR record is set in their panel — DigitalOcean, OVH, Hetzner, Vultr, AWS, wherever the machine lives. Creating a PTR-type record inside your Cloudflare zone does nothing for your server’s IP, and chasing reverse DNS in the Cloudflare dashboard is a reliable way to lose an afternoon while Gmail keeps refusing your mail.
What’s happening
When your server connects to a receiving mail server, the receiver takes the connecting IP — say 203.0.113.25 — and queries 25.113.0.203.in-addr.arpa for a PTR record. That zone is delegated down from the regional internet registry to whoever was allocated the address block: your hosting provider. Only the block owner (or someone they delegate to) can publish PTRs in it. Cloudflare is authoritative for example.com because your registrar points NS records at it; nothing in that arrangement touches in-addr.arpa.
Receivers care because reverse DNS is a cheap honesty check. Gmail and Outlook.com expect a sending IP to have a PTR, and the strong version — forward-confirmed reverse DNS (FCrDNS) — requires the loop to close: the IP resolves to mail.example.com, and mail.example.com resolves back to the same IP. Add the SMTP HELO name to the same value and you have the three-way match that mail reputation systems want. The forward half of that loop is Cloudflare’s job (the A record, DNS-only), which is where the two systems meet — and the only place they do. The one genuine exception: organizations with their own IP space can have the reverse zone delegated to any DNS host, Cloudflare included. If you did not bring your own address block, that is not you.
What to check first
- Which IP your mail actually leaves from. Not necessarily the web server’s IP — check a real message’s
Receivedheaders or query from the box itself. - Whether that IP has a PTR today, and what it says. Default provider PTRs (
static.25.113.0.203.clients.your-server.example) exist but look like what they are. - What your HELO/EHLO name is. Exim’s
primary_hostname, Postfix’smyhostname— it should equal the PTR value. - Where the IP lives. The provider’s panel is where the fix happens: DigitalOcean derives the PTR from the droplet’s name; OVH, Hetzner, Vultr, and Linode have explicit reverse DNS fields; AWS takes a form (or self-service on Elastic IPs).
How to verify
# The sending IP, asked from the server itself
curl -s https://api.ipify.org
# The PTR for that IP
dig -x 203.0.113.25 +short
# Close the loop: does the PTR's hostname resolve back to the same IP?
dig +short A mail.example.com
dig @1.1.1.1 +short A mail.example.com
# The HELO name your server announces — the 220 banner shows it
openssl s_client -connect mail.example.com:25 -starttls smtp -brief
A live delivery test shows how receivers see you — swaks --to you@your-test-mailbox.net --from user@example.com --server 127.0.0.1 from the mail host, then read the Received: line at the destination: it prints the PTR it resolved next to your IP. Rejections tied to reverse DNS are explicit in the mail log — grep -i "reverse DNS\|PTR" /var/log/exim_mainlog turns up receiver complaints verbatim.
The fix
- Set the PTR at the hosting provider to your mail hostname —
mail.example.com. On DigitalOcean, rename the droplet to the FQDN; on OVH/Hetzner/Vultr/Linode, fill the reverse DNS field on the IP; on AWS, submit the reverse DNS request or set it on the Elastic IP. - Make the forward record match in Cloudflare: an A record for
mail.example.compointing at exactly that IP, DNS-only. A proxied record would “close the loop” onto Cloudflare edge IPs, which fails FCrDNS. - Align the HELO name — set
primary_hostname(Exim) ormyhostname(Postfix) tomail.example.com, restart the MTA. - Wait briefly and re-verify. Provider PTR changes usually land within minutes to an hour. Re-run
dig -xand aswakstest; the destination’sReceived:header should show hostname and IP agreeing. - Repeat per sending IP. Servers with multiple outbound IPs need a PTR per IP, each with a matching forward record.
When this fix is wrong
If you send through a relay — SES, SendGrid, Postmark, a smarthost — the connecting IP belongs to the relay, and its PTR is their business and already handled; setting yours changes nothing for that path. If mail still lands in spam with perfect FCrDNS, reverse DNS was necessary but not sufficient — reputation, authentication, and content take over. And if you operate your own address space with BIND, delegated reverse zones are a different discipline entirely — covered in reverse DNS and PTR for mail with BIND9.
Common mistakes
- Adding a PTR-type record in the Cloudflare zone and expecting receivers to find it — nothing queries your forward zone for reverse lookups.
- Leaving the provider’s default PTR in place, which many receivers score as “generic/dynamic” and treat coldly.
- Setting the PTR to a hostname that does not resolve back, failing forward confirmation.
- A HELO name that disagrees with the PTR — two of three matching still draws penalties.
- Fixing the PTR on the web server’s IP while mail actually leaves from a different one.
Prevention
Make PTR part of the server provisioning checklist, not a post-incident scramble: allocate the IP, set the reverse at the provider, create the matching DNS-only A record in Cloudflare, set the HELO, then send the first message. Re-verify after any IP change or migration. Cloudflare’s DNS documentation describes what the forward zone can host; your provider’s panel owns the rest.
Mail that breaks after a DNS move is one of the most common incidents we untangle — Stack Harbor manages the full DNS and mail path under Managed Cloud Ops; book an infrastructure review before the next migration.