I apologize if this is in the wrong forum section as I could not find a cPanel section

What is the purpose of the main domain? I have a hosting plan with HostGator that allows unlimited domains, and therefore, I can host unlimited websites by create add-on domains. Wouldn't it be disorganized if I built a website on the main directory for that main domain, then build several other websites on add-on domains? Add-on domains are added as subdirectories in the main directory.

So, the reason why I ask this is, how do people organize their cPanel? Do they leave the main directory alone, and just focus on the add-on domain directories? I'm probably not using proper webhosting terms so I hope I'm not confusing anyone

bluedreamer
—
2014-01-02T20:25:54Z —
#2

The main domain is the one your account uses and is normally mapped to files in /public_html

For addon domains the normal method is to create a folder inside /public_html such as /public_html/mysite.com (indeed this is what happens when you add a new site in Cpanel>Add domain)

inline6
—
2014-01-02T20:33:16Z —
#3

but i'm still confused to the purpose of the main domain. Why do I need a main domain? I can make a website out of it, but I can also make websites out of add-on domains.

Let's say ABC123.com is set as the main domain, but would it make more sense to make a subdirectory "ABC123" ( /public_html/ABC123) instead of building that site directly into /public_html? Because what if I want other different websites in the future, then they'd all be add-on domains and add-on directories

WebEminence
—
2014-01-04T03:41:48Z —
#4

I understand your confusion. Cpanel needs to have a main domain associated with your account. You could buy an extra domain for the main domain and make all your other sites as add-on domains. Not sure what the point of that would be except to make it more organized in your mind.

The add-on domains are added in sub directories as bluedreamer said. It seems disorganized but it really doesn't matter because no one is going to see this folder structure. They will only see your domain names. So your first domain is your main domain you signed up with and all other domains will be add-on domains. It's just the way it works.

felgall
—
2014-01-04T20:45:41Z —
#5

inline6 said:

Let's say ABC123.com is set as the main domain, but would it make more sense to make a subdirectory "ABC123" ( /public_html/ABC123) instead of building that site directly into /public_html? Because what if I want other different websites in the future, then they'd all be add-on domains and add-on directories

Yes that does make sense. It can be easily done too. You just need a few lines of code in the .htaccess file to redirect all calls to the main folder onto the appropriate sub-folder so that your main domain as well as the addon domains each have their own folder.

A quick search for easy to follow instructions brought up the following page from BlueHost - https://my.bluehost.com/cgi/help/347 (these instructions will work equally well for any hosting that uses an equivalent cPanel setup - including HostGator).

inline6
—
2014-01-05T15:17:36Z —
#6

Thanks all for your replies. I'm really new at this stuff and I couldn't find the answer to this confusion, but you guys have helped clarify it.