What is a subdomain?
A subdomain is a subsection of a domain that operates as a separate site but is part of the primary or addon domain. Here are some key points about subdomains:
- Structure: Subdomains are created as a prefix to the main domain, such as
sub.domain.tld
. - Independent Content: Each subdomain can host its content and files, separate from its domain's content.
- Subdirectory: The files for a subdomain are stored in its document directory specified while creating a subdomain in a cPanel account.
- Common Uses: Subdomains are often used for organizing content, creating development or staging sites, hosting blogs, forums, or e-commerce sections of a website (e.g., blog.domain.tld, shop.domain.tld).
- DNS Configuration: Subdomains require DNS configuration, usually managed within cPanel depending on the domain's nameserver provider.
- No Additional Costs: Creating subdomains does not incur additional costs, as they are part of the domain's hosting in a cPanel account.
Subdomains provide a way to segment your website's content while maintaining a unified domain structure.
Here are the steps to create a Subdomain in a cPanel:
- Log into the cPanel account of your Shared/Reseller hosting service.
- Click the "Domains" tool under the "Domains" section.
- Click the "Create A New Domain" button.
- Enter the subdomain name you would like to add in the "Domain" text box. (e.g.,
sub.domain.tld)
- Deselect the "Share document root (/home/username/public_html) with 'domain.tld'." option. << This is the most important step; do not miss this part.
- Enter the directory path where you would like the files to be stored/hosted for this domain. (It will autofill the default path as /home/username/sub.domain.tld)
- Click the "Submit" button.