DarkxPunk

Well-Known Member
Sep 2, 2012
50
2
133
cPanel Access Level
Root Administrator
The shift away from "addon domains" to simply domains was great, removing the complicated and unnecessary creation of "associated subdomains." I am on a bit of a cleaning spree of my server, trying to cleanup unnecessary AutoSSL requests, bad DNS entries, etc. However I cannot for the life of me figure out how to remove old associated subdomains from domains created previously by using "addon domains." Is there a way to do this, because I can't seem to find a guide anywhere, but maybe I am searching the wrong keywords.

I appreciate any feedback so I can get back to cleanup.

P.S. On the topic of cleanup, we really need to see the ability to choose what service domains are enabled for what accounts and whether for just main domains and/or subdomains.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,280
2,434
363
cPanel Access Level
Root Administrator
Hey there! That subdomain is actually still a requirement, as that is how we create the Apache vhost. You can see this information in the cPanel >> Domains screen:

Screenshot 2023-02-27 at 11.18.06 AM.png

so you won't want to go too crazy on cleaning or removing those.
 

DarkxPunk

Well-Known Member
Sep 2, 2012
50
2
133
cPanel Access Level
Root Administrator
Thanks, but maybe I am mixing something up. I had recently added new domains to a client with the updated Domains screen and none of those newly added domains had an associated subdomain. However a domain that was added prior to the Domains screen update and the removal of the addon domains screen, still has an associated subdomain. If it is a requirement, why do the newly added domains not have any?

Screenshot 2023-02-27 at 13.17.03.png

Thanks!
 

DarkxPunk

Well-Known Member
Sep 2, 2012
50
2
133
cPanel Access Level
Root Administrator
I know about the gear and option, I did already click it prior to the screen shot so that I could see the associated sub domain for the first domain listed. But regardless here is the image showing the present status of the gear button.

Screenshot 2023-02-27 at 13.38.18.png

To expand on it I can show the pages when you manage the domains, first being the old domain and the second the newer:
Screenshot 2023-02-27 at 13.40.11.pngScreenshot 2023-02-27 at 13.40.21.png
 

DarkxPunk

Well-Known Member
Sep 2, 2012
50
2
133
cPanel Access Level
Root Administrator
So an update for everyone, it appears I was getting confused with the new Domains interface and being unable to clearly differentiate add-on and parked/alias domains.

To clarify there is no clear distinction in the new Domains interface which should probably be fixed, but here are the general rules I have now gathered:
  • Parked/Alias domains can only be for the primary domain
  • If the check-box "Share Document Root" is unchecked, even with the same path as the primary domain, it will become an add-on domain with an associated subdomain
    • You can confirm if a mistake like this was made by going here: cat /var/cpanel/userdata/[user]/main
  • Add-on domains require an associated subdomain with cPanel for vhost reasons, don't understand that fully
  • Only way to prevent associated subdomains from resolving is modifying your DNS entries
  • Add-on domains shouldn't create additional service subdomains, but you can remove them by following this:
  • You cannot individually disable service domains, but you can prevent them resolving by modifying your DNS entries
  • If you want to manage your AutoSSL stuff, you'll need to do that manually per domain/subdomain if you are trying to clean it up
Hope this helps someone in the future!
 
  • Like
Reactions: cPRex