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
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
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.
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).