A subdomain is a domain using your main domain and a prefix name. As an example, let's say our main domain is example.com. We want to create a domain for our support department and direct visitors to a separate area on our web site. Our subdomain would use "support" as the prefix and "example.com" as the main domain. The example of putting these two together are shown below:
EXAMPLE: support.example.com
Consider a subdomain a url for any area on your web site. You can create the prefix as any name you want based on your own personal preferences.
Creating A Subdomain
Steps
To create a sub domain, perform the following steps:
- Click Create a New Domain. A new interface will appear.
- Enter a fully qualified domain name in the Domain text box.To create a subdomain, enter a new name followed by a period (
.
) and then the website’s domain. For example, entersubdomain.example.com
to create a subdomain ofexample.com
. - Optionally, you can specify the directory where you want the files for the domain to exist (the domain’s document root). To create this directory, deselect the Share document root with “example.com” checkbox, where
example.com
represents your main domain. You cannot use the following directories- The account’s home directory itself (
/
) - Directories outside of the account’s home directory (
./
and../
) .cpanel
.trash
etc
mail
ssl
tmp
logs
.cphorde
.spamassassin
.htpasswds
var
cgi-bin
.ssh
perl5
- The account’s home directory itself (
- To automatically redirect the new domain’s visitors from the insecure version of the website to the secure version, set the Force HTTPS Redirect toggle to On.
- Click Submit or click Submit and Create Another Domain.
cPanel reference: https://docs.cpanel.net/cpanel/domains/domains/