Skip to content

Putting cPanel addon and parked domains behind Cloudflare, zone by zone

One Cloudflare zone covers one domain. Every addon and alias domain on a cPanel account needs its own zone, its own records, and its own SSL mode — here is the per-zone runbook.

Cloudflare does not know or care that client-two.com is an addon domain of the same cPanel account as client-one.com. Each registered domain is its own Cloudflare zone with its own nameserver delegation, its own DNS records, its own proxy toggles, and its own SSL/TLS mode. The runbook is therefore the same single-domain setup repeated per domain — and every recurring failure in this area comes from assuming the main domain’s zone settings somehow extend to the others.

What’s happening

On the cPanel side, addon domains (and aliases, formerly “parked domains”) are conveniences of one account: extra vhosts and mail domains sharing a home directory. On the Cloudflare side, none of that structure exists. A zone is bound to one registrable domain, so a server hosting one account with four addon domains needs five Cloudflare zones to front everything.

Because each zone is independent, settings drift is the default state. One zone ends up in Full (strict), another was created years earlier and still sits on Flexible, and only the Flexible one loops or serves insecure content — a confusing picture when all the sites live in the same public_html tree. Mail splits the same way: each addon domain that has mailboxes carries its own MX, SPF, and DKIM records, and each new zone must reproduce them.

There is also a cPanel artifact worth knowing: creating an addon domain historically also created addon-domain-subdomain entries under the main domain (like client-two.client-one.com). Those live in the main domain’s zone and serve the same content — worth cleaning up or at least deciding about, since they bypass the addon domain’s own zone entirely.

What to check first

Get the authoritative inventory of what the account actually hosts before creating zones:

# All domains on the account, by type
uapi --user=exampleuser DomainInfo list_domains

# Server-wide view, if you manage many accounts
whmapi1 get_domain_info | grep -E 'domain:|domain_type:' | head -40

Then, for each domain: where is it registered, who runs its DNS today, and does it send or receive mail? An alias domain that exists purely to redirect needs far less care than an addon domain with twelve mailboxes.

How to verify

For every domain going behind Cloudflare, confirm the current state and keep it as the baseline:

dig +short NS client-two.com
dig +short A client-two.com
dig +short MX client-two.com
dig +short TXT default._domainkey.client-two.com

# Zone content as cPanel serves it today — repeat per domain
whmapi1 dumpzone domain=client-two.com

After each zone is built at Cloudflare and before switching its nameservers, run the same queries against the assigned Cloudflare nameservers and diff against the baseline.

The fix

  1. Add each domain as its own Cloudflare zone. Free plan per zone is fine. Do not trust the quick scan — import or recreate records from the dumpzone output, exactly as in the full DNS migration runbook.
  2. Set proxy status per record, per zone. Web records orange if you want the proxy; the MX target, mail, webmail, cpanel, autodiscover, autoconfig, and ftp stay DNS only — in every zone, not just the first one.
  3. Match the SSL/TLS mode across zones. Set every zone to Full (strict) once the origin has a valid certificate. A single zone left on Flexible produces redirect loops and mixed behaviour that looks account-wide but is zone-specific — the handshake-level symptoms are covered in Cloudflare 525/526 errors.
  4. Carry the mail records for each mail-bearing domain. Each addon domain’s DKIM key is distinct; copy each default._domainkey TXT from its own zone dump, and give each zone an SPF record naming the origin.
  5. Switch nameservers at each domain’s registrar. They are often different registrars with different logins — collect credentials before the change window, not during it.
  6. Re-run AutoSSL after cutover. Certificates for addon and alias domains validate through the same edge rules as the main domain; if DCV fails once proxied, the fixes are in AutoSSL DCV failures behind Cloudflare.
  7. Decide what to do with the addon-as-subdomain leftovers. Either remove the client-two.client-one.com records from the main zone or accept that the content is reachable there too — just make the choice deliberately.

When this fix is wrong

If an addon domain is low-value — a redirect, a placeholder — a DNS-only Cloudflare zone (or leaving its DNS on cPanel entirely) is a perfectly sound choice; the proxy is opt-in per site, not a fleet mandate. If a domain’s mail is hosted remotely, its zone follows that provider’s records rather than the cPanel template. And if you have dozens of domains, adding zones one by one through the dashboard is the wrong tool — the Cloudflare API does bulk zone creation cleanly.

Common mistakes

Assuming the main zone covers the addons. Leaving one zone on Flexible while the rest run Full (strict). Forgetting per-domain DKIM records, so the second domain’s mail starts failing DMARC. Proxying the MX target on zone three after doing it correctly on zones one and two. Changing nameservers before the zone content was verified against the baseline. Treating alias domains as “not real domains” and skipping their zones entirely, then wondering why their redirects die.

Prevention

Keep a per-server table of every domain, its zone, its registrar, its SSL mode, and whether it carries mail — and review it whenever an addon domain is created or removed in cPanel, because Cloudflare will not create the zone for you. The per-zone model is documented in Cloudflare’s DNS documentation.

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