Why does cPanel create two domains for an add-on domain?

raindog308

Member
Apr 16, 2012
20
0
51
cPanel Access Level
Root Administrator
I'm logged into cPanel as a regular user (not root or reseller).

Let's say my domain is example.com. If I add a second domain (let's call it foo.com), then in various dialogs I will see:

example.com
foo.com
foo.example.com <--- what is this!?

If I add bar.com, then I will see

example.com
foo.com
foo.example.com
bar.com
bar.example.com

For example, I see this in the choose log program dialog, or in the redirects page. I see it in various third-party programs (such as Softaculous).

In other dialogs, I will only see 'example.com', 'foo.com', and 'bar.com'.

Why does cPanel do this?
 

JaredR.

Well-Known Member
Feb 25, 2010
1,834
24
143
Houston, TX
cPanel Access Level
Root Administrator
An addon domain is a subdomain that also has an alias that allows it to be browsed as a domain. Anytime you add an addon domain, a subdomain of the account's domain will be added to the account, as well as the addon domain. Our documentation explains this:

https://documentation.cpanel.net/display/ALD/Addon+Domains#AddonDomains-Createanaddondomain

You can access the addon domain's content by either browsing the domain, or the subdomain.

If you only want to add an alias to an account, without creating a subdomain, you may want to consider adding a parked domain instead of an addon domain. More information about parked domains is available here:

https://documentation.cpanel.net/display/ALD/Parked+Domains
 

raindog308

Member
Apr 16, 2012
20
0
51
cPanel Access Level
Root Administrator
Thanks for the response.

But that's just weird.

Many users want to serve several domains. It's strange to me that if I have example.com, then if I want to host foo.com in the same account (a very common example), I am forced to also have foo.example.com as a subdomain. They may be completely unrelated.

Seems a sort of hacky technique on cPanel's part.
 

JaredR.

Well-Known Member
Feb 25, 2010
1,834
24
143
Houston, TX
cPanel Access Level
Root Administrator
I want to host foo.com in the same account (a very common example), I am forced to also have foo.example.com as a subdomain.
You are not necessarily forced to add the subdomain. If you just want foo.com to be an alias to example.com, serving the same Web content, you can add foo.com to the account as a parked domain. No subdomain is created if you add a parked domain.

Addon domains always have an associated subdomain created automatically, and that is a basic part of cPanel's architecture. It is a bit different from some other control panels, but it is intended behavior. If you want to add a domain and have it be an alias to the same content as the domain on the account, add it as a parked domain. If you want the additional domain to have its own content, add it as an addon domain. We give you the option, depending on your purpose for the additional domain.
 

sushlik

Active Member
Mar 2, 2012
26
0
51
cPanel Access Level
Root Administrator
I don't get the point. For example:
If I have a product to sell on domain.com and provide documentation for that product on domain.org, cPanel does not let me create these 2 domains as 2 different websites, each having their own directory, ftp-users etc.!

The explanations given on your documentation is not really helpful in order to let me add both domains as separate websites.

I want to migrate a few hundred accounts from my previous hosting-panel to cPanel and a lot of them have use-cases like the above mentioned. What can I do in WHM so that my users can add multiple addon-domains as single websites?

Thank you for your help,
Sascha

- - - Updated - - -

I've noticed that I can add 2 domains as decribed above when using different ftp-usernames. But here again something that does not work:

I can't use e.g. subdomain / ftp-username "domain_org", must obviously be "domainorg" ... still not the way i want it to work *sigh*

- - - Updated - - -

one last thing: "domain-org" is possible. I accept this kind of workaround now, have no other choice yet, correct?