A subdomain is a prefix added to your main domain, creating a separate section of your website. For example: blog.example.com or shop.example.com.
Common Uses for Subdomains
blog.example.com- Blog or news sectionshop.example.com- E-commerce storestaging.example.com- Development/testing sitesupport.example.com- Help desk or support portalmembers.example.com- Members-only area
Creating a Subdomain
- Log into cPanel
- Go to Domains section
- Click Domains
- Click Create A New Domain
- Enter the full subdomain (e.g.,
blog.example.com) - The document root is auto-filled
- Click Submit
Alternative Method (Subdomains Tool)
In some cPanel versions:
- Go to Domains > Subdomains
- Enter subdomain name (just the prefix, e.g.,
blog) - Select the parent domain
- Document root auto-fills
- Click Create
Subdomain Directory Structure
By default, subdomains are created in:
public_html/subdomain_name
Example: blog.example.com > public_html/blog
Installing WordPress on a Subdomain
- Create the subdomain first
- Go to Softaculous Apps Installer
- Select WordPress
- Choose your subdomain from the dropdown
- Complete the installation
SSL for Subdomains
AutoSSL automatically covers subdomains. To verify:
- Go to Security > SSL/TLS Status
- Find your subdomain in the list
- If not secured, click Run AutoSSL
Creating Email for Subdomain
You can create email addresses using the subdomain:
- Go to Email > Email Accounts
- Click Create
- Select the subdomain from the domain dropdown
- Example:
[email protected]
Wildcard Subdomains
A wildcard subdomain (*.example.com) directs all undefined subdomains to one location. This is useful for multi-tenant applications.
- Create a subdomain with
*as the name - Point to desired document root
Removing a Subdomain
- Go to Domains
- Find the subdomain
- Click Manage > Remove
Note: Files in the subdomain folder are not deleted automatically.
Subdomain vs Addon Domain
| Subdomain | Addon Domain |
|---|---|
| Uses your main domain | Completely separate domain |
| No extra domain registration | Requires domain registration |
| Example: blog.example.com | Example: otherdomain.com |