In short
A mail server needs three things to match: the hostname it uses to greet (HELO), the A record for that hostname pointing to the server IP, and the PTR record for that IP pointing back to the same hostname. If they don't match, Gmail and Outlook distrust everything it sends. The PTR isn't created in cPanel: the provider that owns the IP sets it. Each domain's MX records, on the other hand, say which server receives its inbound mail.
What each record does
| Record | Question it answers | Example |
|---|---|---|
| A | What IP does this name have? | server.yourhosting.com → 203.0.113.10 |
| AAAA | What IPv6 address does this name have? | server.yourhosting.com → 2001:db8::10 |
| MX | Which server do I deliver this domain's mail to? | yourcompany.com → mail.yourcompany.com (priority 0) |
| PTR | What name does this IP have? (reverse DNS) | 203.0.113.10 → server.yourhosting.com |
| HELO / EHLO | How does the server introduce itself when sending? | EHLO server.yourhosting.com |
Why they must match (FCrDNS)
Receiving mail servers run a check called forward-confirmed reverse DNS (FCrDNS): they take the connecting IP, look up its PTR, and verify that the A record of that name points back to the same IP. If the IP has no PTR, or the PTR is generic (like ip-203-0-113-10.provider.net), the server looks like a home connection or an infected machine.
Gmail requires a valid PTR from every sender. Many other servers reject connections outright when there's no PTR or the HELO name doesn't resolve.
How to set it up on a cPanel server
- Pick a fully qualified hostname that isn't a customer domain, for example
server1.yourhosting.com, and set it in WHM › Networking Setup › Change Hostname. - Create the A record for that hostname pointing to the server's main IP. WHM offers to create it if DNS is on the same server.
- Ask for the PTR from your server provider or data centre: the IP must resolve to the same hostname. Many providers let you set it in their panel.
- Check Exim greets with that name. By default it uses the server hostname. If the server has several IPs and sends from another one, each IP needs its own PTR.
# The hostname resolves to the IP
dig +short A server1.yourhosting.com
# The IP resolves to the hostname (PTR)
dig +short -x 203.0.113.10
# The name your server greets with
exim -bP primary_hostnameMX records and cPanel email routing
- An MX points to a name, never to an IP, and that name must have an A record (not a CNAME).
- The lowest priority is tried first. A backup MX is only useful if it really accepts and stores mail for that domain.
- Check the routing in cPanel › Email › Email Routing. If the domain's mail lives in Google Workspace or Microsoft 365, it must say "Remote Mail Exchanger". If it says "local", the cPanel server delivers internally any mail its other accounts send to that domain, and it never reaches Google or Microsoft.
The IPv6 problem
If the server has IPv6, Exim may send to Gmail over IPv6. Gmail is stricter with IPv6: without a PTR and correct authentication, it rejects or junks the mail. There are two ways out: get a PTR for the IPv6 address too and add it to SPF, or make Exim send over IPv4 only until that's ready.
Common mistakes
| Mistake | Consequence | Fix |
|---|---|---|
| IP without a PTR | Rejections and spam at Gmail, Outlook and others | Ask the IP's provider for a PTR |
| Generic data centre PTR | Looks like a residential or unmanaged IP | Change it to the server hostname |
| Hostname that is a customer domain | Trouble when that customer moves servers | Use a subdomain owned by the hosting company |
| MX pointing to a CNAME or an IP | Failed deliveries on some servers | MX to a name with an A record |
| Local routing with mail at Google or Microsoft | Internal emails that never arrive | Switch to Remote Mail Exchanger |
Frequently asked questions
Where do I set the PTR in cPanel?
You don't: the PTR is controlled by whoever owns the IP, your server provider or data centre. Ask them, giving the IP and the server hostname.
Does the PTR have to match my email domain?
No. It must match the server hostname and the name it uses to greet (HELO). Email domains are authenticated with SPF, DKIM and DMARC.
What is FCrDNS?
The check that an IP's PTR points to a name whose A record points back to the same IP. Mail servers use it to weed out home or infected machines.
Do I need a PTR for IPv6?
Yes, if the server sends mail over IPv6. Gmail is especially strict with IPv6 without a PTR.
Protect inbound email on your whole server
With your DNS in order, protect what comes in too: Clisec filters phishing, BEC, spam and malware across your whole cPanel server.