The Basics
You can have multiple domain names share the space on your cPanel account. It works like this:
Your primary domain, maindomain.com, uses the directory ~/public_html for its website files.
Your first add-on domain, example.com, uses the directory ~/public_html/example.com for its website files.
Your next add-on domain, example2.com, uses the directory ~/public_html/example2.com for its website files.
Create a New Add-On Domain
-
Log in to your cPanel account (http://maindomain.com/cpanel).
-
Click Add-on Domains from the Domains section
-
Fill in the following information for the blank text boxes:
-
New Domain Name: example.com
-
Subdomain/FTP Username
-
Document root
Note: these last two should populate automatically. -
Password: (choose a password)
-
-
Click Add Domain
-
Now log in to your cPanel account using FTP and upload the file to ~/public_html/example.com
Upload to an Add-on or Subdomain
There are a couple of different ways you can upload to your add-on domain or subdomain via FTP.
OPTION A
-
Open your preferred FTP client
-
Enter the following information to connect:
Host - add-on domain name (in our case example.com)
User - example@maindomain.com
Password - what you entered during add-don domain creation
Port - 21
-
Once successfully connected to the root of the add-on domain name, upload your files
OPTION B
-
Open your preferred FTP client
-
Enter the following information to connect:
Host - primary domain name
User - cPanel username
Password - cPanel password
Port - 21
-
Once successfully connected to the home directory of your domain name upload your files into the add-on domain folder, which is within the public_html folder
Advanced Tips and Tricks
The username/directory/subdomain name above not only creates the directory 'example.com', but also a subdomain called 'example.maindomain.com' and an FTP user account 'example@maindomain.com'.
The FTP user account is useful if you want to give someone access to upload files to the Add-On Domain but don't want to give them your cPanel password. Just give them 'example@maindomain.com' for the username and the password you entered above and they can upload files to that directory only.
The subdomain is how cPanel keeps track of which add-on domains belong to which account. When you want to view website statistics (visitors, referring sites, etc), you'll look for the subdomain stats in cPanel rather than the primary domain's stats.