addon domain vs subdomain vs username, I don't get it..?

kazimir82

Member
Apr 15, 2011
14
0
51
Suppose my main domain is "abc.com" and I want to add a second domain "pqr.com". This domain is supposed to be hosted in a different directory (i.e. not under the same document root as abc.com).

When I go to Addon Domain, I have to specify not only the domain, but also a "Subdomain / FTP Username" and a password.

What's that for? I would prefer to simply manage (ftp/upload/etc) both domains with the existing main user account.

Even if cPanel forces me to create a new user for each addon domain (doesn't make sense to me, imho this should optional, but ok), then what is the relation between username and subdomain? I don't need any specific subdomain, yet if I specify "user2" as subdomain/username for this new pqr.com addon domain, it seems to create a "user2.abc.com" subdomain!? (note: abc.com being the main domain!)

Sorry if this sounds confusing, am I missing the point here? Can anyone please enlighten me?
 

JayFromEpic

Well-Known Member
Apr 2, 2011
218
8
68
Scottsdale
cPanel Access Level
Root Administrator
Twitter
You will still be able to access both sites through the main domains FTP. The part that allows you to put in ftp user name and password is mainly for convenience so say you hired a developer for that one site, you don't need to give him access to the main FTP. It's just a convenience factor basically.

By adding a addon domain, the site will have its own directory, it is just in a folder per say in the main sites directory. It is two seperate sites. If you would want both to have there own login name and all that, you will need to either make another account if your a vps, dedicated, or reseller user or purchase another hosting account for that other domain.
 

kazimir82

Member
Apr 15, 2011
14
0
51
OK thanks, yeah I understand the use of an additional FTP account (with limited access to only a specific (sub)domain or subdirectory thereof), although I don't need that in this particular case.

But the restriction of either putting a second domain in a subdirectory within the first, OR putting it in different accounts but then also necessarily with different FTP logins, seems really strange..?

I mean it doesn't strike me as a standard behavior or requirement that pqr.com should always be accessible as abc.com/pqr/ or something, even if I manage both sites through the same FTP account.

In fact, a site that works as pqr.com wouldn't even work correctly as abc.com/pcr/ if it refers to content (images etc) as src="/something", which I think is quite common.

Oh well, I guess that's just the way cPanel works...
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Hello,

Actually, while the subdomain name must always exist off of the main domain name for any addon domain (so you have sub1.maindomain.com, sub2.maindomain.com), the path of abc.com/pcr isn't a requirement for subdomains unless the hosting provider has this Tweak Setting in WHM set to "On":

public_html subdomains only
If this is not set to "On" in WHM > Tweak Settings to enforce public_html subdomains, then you can remove the public_html portion of the directory path during addon domain creation and have each addon domain (with the subsequent subdomain) create in /home/username location giving it the directory path of /home/username/sub1 for the folder name instead. So what you end up with for your primary domain and each subdomain as the following:

main domain - /home/username/public_html
addon domain 1 - /home/username/sub1
addon domain 2 - /home/username/sub2
and so on

Thanks
 

kazimir82

Member
Apr 15, 2011
14
0
51
Hey, thanks a lot Tristan, that's quite useful. Got it to work like you described!

As for the automatic subdomain creation:
Actually, while the subdomain name must always exist off of the main domain name for any addon domain (so you have sub1.maindomain.com, sub2.maindomain.com),
Any chance you guys will consider changing this? Or perhaps better: making it optional, or allowing to delete the pqr.abc.com for people who only need abc.com and pqr.com but not pqr.abc.com?

I found out I could delete the additional FTP user that gets created along in the process, the same possibility for the mandatory subdomain would make sense imho.

Cheers!
 

JaredR.

Well-Known Member
Feb 25, 2010
1,834
23
143
Houston, TX
cPanel Access Level
Root Administrator
An addon domain is actually, by definition, a special kind of subdomain that can also be accessed as its own domain. It is core to the product to set up an addon domain as a subdomain.

Another option is a parked domain, which is simply an alias to the main domain and does cause a subdomain or an FTP account to be created.

This section of our documentation offers more information about parked domains, addon domains, and the differences between them:

cPanel Domains
 

kazimir82

Member
Apr 15, 2011
14
0
51
An addon domain is actually, by definition, a special kind of subdomain that can also be accessed as its own domain. It is core to the product to set up an addon domain as a subdomain.
Ok thanks, I see. And how about the possibility of 'secondary domains' (or something similar) that work the way I describe above: just like an addon domain, but not necessarily as a subdomain of the main domain.

I assume it shouldn't be a big deal from a technical point of view, as it seems that the current addon domain behaviour (i.e. adding domain2.com also automatically creates a domain2.maindomain.com subdomain) is something 'extra' that would just be skipped for this secondary domain idea.

Or alternatively, how about the possibility of deleting subdomains, leaving the addon domain itself intact? I.e. if I added domain2.com and also got domain2.maindomain.com on the fly, an option to delete the domain2.maindomain.com subdomain while leaving domain2.com as it is.

Either way, I hope this suggestion helps. Maybe I'm too much 'multiple domain' minded whereas CPanel is typically 'one (main) domain' oriented, and I should get separate CPanel instances for any additional domains. :)
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator