Skip to content

cPanel service records that must stay DNS-only in Cloudflare

mail, webmail, cpanel, autodiscover, ftp, and the MX target must keep the grey cloud. Here is the full list, why the proxied-MX failure is so slow to surface, and how to audit a zone.

On a Cloudflare zone in front of a cPanel server, these records must stay DNS-only (grey cloud): the A record your MX points at, mail, webmail, cpanel, whm, webdisk, cpcontacts, cpcalendars, autodiscover, autoconfig, ftp, and the server’s own hostname. The rule behind the list: Cloudflare’s proxy only carries HTTP and HTTPS on a fixed set of ports. Everything else — SMTP, IMAP, POP3, FTP, SSH, WebDAV — is dropped at the edge, and a proxied record for those services is an outage with a delay timer on it.

What’s happening

The orange cloud replaces your server’s IP with Cloudflare’s in every DNS answer. For a website that is the whole point. For anything that is not web traffic, it is a dead end: a sending mail server that resolves your MX target to a Cloudflare edge IP connects to port 25 and finds nobody listening, because the proxy does not forward SMTP on any plan short of an Enterprise Spectrum setup.

The proxied-MX failure is the nastiest of the family because SMTP is built to be patient. Senders queue the message and retry on a backoff schedule, typically for four to five days, before returning a bounce. For the first day or two, nobody notices anything — mail is just “slow.” By the time the first bounce lands, the DNS change that caused it is a week old and long forgotten. That is why this one deserves the word disaster: not because it is hard to fix, but because it is discovered late and the losses are silent.

The panel and service subdomains fail differently. Some of them happen to sit on ports Cloudflare can proxy — that is luck, not design — but webdisk (2077/2078) and the CalDAV/CardDAV service behind cpcontacts and cpcalendars (2079/2080) are not on the compatible list at all, and proxied panel logins arrive from Cloudflare IPs, which sends cPHulk chasing the wrong client. The port-by-port detail is in reaching cPanel and WHM ports behind the Cloudflare proxy. Keep operational plumbing grey and the problem class disappears.

What to check first

Open the zone in the Cloudflare dashboard (DNS » Records) and read the proxy column, not just the record values. The dashboard usually shows a warning when an MX target is proxied, but zone imports and API edits can slip past it, so treat the warning as a courtesy rather than a guarantee. Then check whether any expected service records are simply missing — cpanel.example.com and friends only existed in the cPanel-hosted zone, and Cloudflare’s import scan often does not find them.

How to verify

Compare what each service hostname resolves to against the server’s real IP:

# The origin's actual IP
curl -s https://api.ipify.org

# What the world resolves for each service hostname
dig +short A mail.example.com
dig +short A webmail.example.com
dig +short A cpanel.example.com
dig +short A ftp.example.com
dig +short MX example.com

If a service record answers with an IP inside Cloudflare’s ranges instead of the server’s, it is proxied. For the MX chain specifically, prove that port 25 is reachable from outside the server (from your workstation or another host):

# From an outside machine: does the MX target accept SMTP?
nc -vz -w 5 mail.example.com 25

A proxied MX target times out here even though the website loads perfectly — that split is the signature of this misconfiguration.

The fix

  1. Grey-cloud the mail chain first. In DNS » Records, set the MX target’s A record, mail, webmail, autodiscover, and autoconfig to DNS only. This is the outage-with-a-timer item; do it before anything else.
  2. Grey-cloud panel and file services. cpanel, whm, webdisk, cpcontacts, cpcalendars, ftp, and the server hostname all point at machinery that either is not proxyable or should not arrive from shared edge IPs.
  3. Create the records that never made it over. If cpanel.example.com returns nothing, add an A record pointing at the server IP, DNS only. Pull the authoritative list from the cPanel side with whmapi1 dumpzone domain=example.com and fill the gaps.
  4. Leave Email Routing off. It replaces your MX records with Cloudflare’s and is a separate product for domains whose mail Cloudflare should forward — not for domains with mailboxes on the cPanel box.
  5. Re-test from outside. Re-run the dig and nc checks above, and watch a live test message arrive in /var/log/exim_mainlog.

When this fix is wrong

If the domain’s mail is hosted remotely — Microsoft 365, Google Workspace, a filtering gateway — then mail and autodiscover follow that provider’s requirements and may not point at the cPanel server at all. The DNS-only rule still applies to whatever the MX points at; it is just no longer your server. And if your goal is hiding the origin IP entirely, understand the trade honestly: mail and service records that stay DNS-only necessarily publish the IP. What that means and what to do about it is covered in origin IP exposure on cPanel servers behind Cloudflare.

Common mistakes

Orange-clouding every record because more proxy feels like more security. Relying on the dashboard warning to catch a proxied MX target after a bulk import. Enabling Email Routing on a domain whose mailboxes live in cPanel. Deleting cpcontacts and cpcalendars as clutter, then fielding calendar-sync tickets. Fixing the apex zone but forgetting addon domains, which each have their own zone and their own copy of every one of these records.

Prevention

Make the grey list part of the zone review after every migration and every bulk edit: mail chain, panel services, hostname — grey; web — orange by choice. Cloudflare’s own reference on proxy status is worth bookmarking: developers.cloudflare.com/dns/. When in doubt about whether a record should be proxied at all, the decision framework is in the DNS-only vs proxied explainer.

Running Cloudflare in front of cPanel/WHM is a stack Stack Harbor operates daily as an official cPanel NOC partner — cPanel/WHM management covers the DNS, mail, SSL, and firewall plumbing, and you can start a conversation any time.