Subdomains in cPanel: create, secure, and remove
Create subdomains in the current cPanel Domains interface, choose the document root, confirm DNS, enable SSL,
On this page
A subdomain is a prefix on an existing domain, such as blog.example.com, staging.example.com, or shop.example.com. In current cPanel versions, subdomains are created from the Domains interface.
What is a subdomain?
| Domain type | Example | Best use |
|---|---|---|
| Subdomain | docs.example.com | A separate section or application under an existing domain. |
| Addon domain | secondsite.com | A separate domain hosted inside the same cPanel account. |
| Alias domain | example.net | Another domain showing the same site as an existing domain. |
Before you create a subdomain
- Confirm the parent domain is already added to the cPanel account.
- Choose a clear name, such as
blog,app,staging, orsupport. - Decide where the files should live. The document root controls which folder is shown online.
- If the domain uses external DNS, be ready to add a matching DNS record at the DNS provider.
A subdomain shares the same cPanel account resources, file ownership, PHP settings, and plan limits unless you intentionally configure separate application settings.
Create a subdomain
- Log in to cPanel.
- Open Domains.
- Click Create A New Domain.
- Enter the full subdomain, for example
blog.example.com. - If cPanel offers Share document root, leave it unchecked for a separate subdomain site.
- Review or edit the document root path.
- Click Submit.
Older cPanel themes may show a separate Subdomains icon. The same rules apply: enter the prefix, choose the parent domain, and confirm the document root.
DNS and SSL
If your domain uses UnderHost nameservers, cPanel normally creates the subdomain DNS record automatically. If your DNS is hosted elsewhere, add an A record for the subdomain pointing to the hosting server IP, or a CNAME record if your DNS provider and application design call for it.
After DNS resolves to the UnderHost server, run or wait for AutoSSL so the subdomain receives a valid certificate. You can check this in cPanel under SSL/TLS Status.
Upload files
Upload the subdomain's website files into the document root shown in cPanel. Common examples:
/home/username/blog.example.com/home/username/public_html/blog/home/username/staging
Use cPanel File Manager for quick uploads, or FTP/SFTP for larger sites and ongoing development.
Redirect a subdomain
If the subdomain should forward visitors somewhere else, use cPanel Redirects instead of uploading site files to the subdomain folder.
- Open cPanel Redirects.
- Choose Permanent (301) or Temporary (302).
- Select the subdomain as the source.
- Enter the full destination URL.
- Click Add.
To remove the redirect later, return to Redirects, find the rule, and delete it. If the subdomain still redirects after removal, clear browser, CDN, and application cache.
Remove a subdomain
- Go to cPanel Domains.
- Find the subdomain.
- Click Manage or the removal option shown by your cPanel theme.
- Confirm the removal.
Removing the subdomain mapping does not always delete the files in the document root. Review the folder in File Manager before deleting anything manually.
Troubleshooting
| Problem | What to check |
|---|---|
| Subdomain does not load | Check DNS resolution and confirm the subdomain points to the UnderHost server IP. |
| Wrong site appears | Confirm the document root and remove any unintended shared document root setting. |
| SSL warning appears | Wait for DNS propagation, then run AutoSSL or check SSL/TLS Status. |
| Files uploaded but not visible | Confirm you uploaded to the subdomain's document root, not the primary domain's public_html. |
Related: How to create and manage addon domains in cPanel | How to set up alias or parked domains in cPanel | Redirects in cPanel: create, test, and remove URL redirects | SSL/TLS management in cPanel-install, check, and renew | cPanel File Manager: upload, edit, organize, and delete files
Need cPanel hosting or licensing?
Use UnderHost cPanel hosting or add cPanel/WHM to a VPS or dedicated server for familiar website, email, DNS, and database management.





















