A customer wants their marketing site at example.com to live on one cPanel account (managed by their agency) and their internal portal at portal.example.com on a different cPanel account (managed by their IT team). Two cPanel users, one domain. cPanel allows this through a specific account-and-subdomain pattern — but with constraints that catch most operators on the first try.
What’s happening
A cPanel account “owns” a primary domain. A domain can only be primary on one account. But subdomains of that domain can be delegated to other accounts as separate cPanel users. The mechanism:
- Account A has primary domain
example.com. - Account B has primary domain
portal.example.com.
For this to work, portal.example.com must not be set up as a subdomain under Account A — if it is, Account B’s WHM setup will reject the domain as already in use.
The DNS view is what matters: the zone example.com (owned by Account A) has an A record for portal.example.com pointing to wherever Account B’s web server is, OR it has NS records delegating portal.example.com to other nameservers if Account B is on a different server.
Mail is the trickiest part. By default, mail for portal.example.com (e.g., info@portal.example.com) hits Account A’s mail server because Exim uses the zone-apex’s mail routing. If Account A is set to handle mail locally but portal.example.com should route to Account B’s mail, you need explicit per-domain mail routing rules.
How to verify
Check current ownership:
whmapi1 list_users
grep example.com /etc/userdomains
grep portal.example.com /etc/userdomains
If example.com is owned by user A and portal.example.com by user B, the multi-account pattern is in place. If both are under the same user, you have an addon or subdomain — not separate accounts.
Confirm DNS reflects the topology:
dig +short A example.com
dig +short A portal.example.com
dig +short NS portal.example.com
If example.com and portal.example.com resolve to different IPs, the multi-account is working. If they resolve to the same IP and there’s no separate vhost for portal, you may be looking at a wildcard or a shared origin.
For mail:
exim -bt info@example.com
exim -bt info@portal.example.com
The two should produce different routes if the accounts are independent.
What to do
- Pick the topology. For two cPanel users on the same server, set up Account A with
example.comas primary. Then on Account B, setportal.example.comas primary. cPanel will create two separate zone files (example.com.dbandportal.example.com.db) and updateuserdomains. - Add NS records for the subdomain in
example.com.dbif Account B’s nameservers are different. Most setups use the same nameservers for both, so this isn’t needed — but if Account B is on a different server with different nameservers, the parent zone needs to delegate explicitly. - Configure mail routing per domain. In WHM > Email Routing Configuration:
- For
example.com: Local Mail Exchanger (Account A handles mail). - For
portal.example.com: Local Mail Exchanger (Account B handles mail).
- For
Both are “local” from their own account’s perspective. The subdomain’s mail goes to Account B’s mailboxes, not Account A’s.
- Watch the DKIM and SPF. Each account has its own DKIM key, published at
default._domainkey.example.comfor Account A anddefault._domainkey.portal.example.comfor Account B. SPF lives at the apex — bothexample.comandportal.example.comneed their own SPF if mail flows from both. - Set permissions per account. Account A’s user can’t edit Account B’s zone (
portal.example.com.db); cPanel enforces this. The two are administratively separate, which is the whole point. - For a single mail flow that needs to span both accounts (e.g.,
info@example.comshould reach an inbox managed by Account B’s team), use forwarders in Account A:info@example.com → info@portal.example.com. Forwarders are cheap, and they keep the user-facing address at the apex while routing internally to the subdomain account.
For more complex setups (three or more accounts under one domain), the same pattern extends — each subdomain becomes its own cPanel account. But this gets unwieldy fast. Past two or three accounts, consider whether you actually need separate cPanel users or whether the operational separation can be achieved via Linux user permissions on a single cPanel account.
Stack Harbor sets up multi-account domain topologies during reseller onboarding as part of cPanel server management.