Addon Domain: Manage Subdomain(s) Only, not the Primary Domain

cPanel & WHM Version
92.0.10

liebn0r

Member
Dec 7, 2017
14
1
3
USA
cPanel Access Level
Website Owner
I have an account, my main account, let's call it Blue and it hosts blue.com on IP 1.2.3.4 (for sake of example). My friend has a domain on their own server, let's call it buddy.com (for sake of example). We want my server to handle all wildcard domains (*.buddy.com) not already being managed by buddy.com's DNS, specifically on the Blue account because that has all the software and environment on it we want to handle *.buddy.com's traffic. We also want SSL enabled.

I'm really close to figuring this out. Here's what I know I need to do:
  • My friend adds DNS records for buddy.com:
    *.buddy.com 1.2.3.4 300
    _cpanel-dcv-test-record.buddy.com ns1.blue.com 300
    _acme-challenge.buddy.com ns1.blue.com 300
  • I add all of buddy.com's nameserver IPs to "Configure Remote Service IPs"
  • I go into the Blue cPanel account and... somehow magically (this is the part I can't figure out) only add *.buddy.com as an addon subdomain and configure it do the subdirectory I want to handle its traffic
  • I install the letsencrypt plugin for AutoSSL and run it for the Blue account
Now I can accomplish this if I add buddy.com as an addon domain with all of the subdomain and DNS configuration that comes with it including www and webmail and cpanel etc etc and then add *.buddy.com as a wildcard subdomain, but ***I don't want*** the server to try to manage the buddy.com primary domain, I only want to manage the wildcard subdomain.

Is there a way to do this properly? If not, to what extent can I edit the DNS records and remove all the crap I don't want? How else can I trim this down to configure only the minimum necessary to accomplish what I want?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,251
534
273
cPanel Access Level
Root Administrator
Hey there! I think you're doing everything correctly. Since the DNS for buddy.com isn't managed and also isn't pointed to your machine, the site itself won't point here even though it may create that domain as part of your setup process. It will exist on the server, but just not be used.

After you create the domain you're welcome to remove any DNS records that you aren't using, such as the "cpanel" and "webmail" entries as that won't negatively impact the account at all.