A subdomain is a prefix in front of your domain, such as blog.example.com or staging.example.com. It can run a completely separate website in its own folder, which makes it ideal for a staging copy, a help centre or a shop. You create subdomains in the cPanel Domains tool.
Before you start
- The parent domain already in your cPanel account (main or addon domain).
- The prefix you want, using letters, numbers and hyphens only.
Create a subdomain hosted in cPanel
- Open cPanel → Domains → Domains and click Create A New Domain.
- Enter the full name, for example
blog.example.com. - Untick Share document root so the subdomain gets its own folder.
- Check the Document Root. cPanel suggests
blog.example.com(i.e./home/user/blog.example.com). Many people preferpublic_html/blog; either works. - Click Submit. cPanel adds the DNS record automatically if the domain uses MdmHost nameservers.
Upload files into the document root, or install an app there with Softaculous by choosing the subdomain in the domain drop-down.
Free SSL for the subdomain
AutoSSL covers new subdomains automatically, usually within a few hours. Check cPanel → Security → SSL/TLS Status; if it shows a warning, click Run AutoSSL. If it still fails, see fix AutoSSL not issuing certificates.
Point a subdomain to another server
Sometimes the subdomain should not live in cPanel at all, for example shop.example.com on a hosted shop platform, or app.example.com on a VPS. In that case do not create it in Domains; add a DNS record instead:
- Open cPanel → Domains → Zone Editor and click Manage next to the domain.
- Click Add Record:
- A record: name
app, value the server IP. - CNAME record: name
shop, value the hostname the platform gives you, such asshops.example-platform.com.
- A record: name
- Save the record. See Zone Editor DNS records for details.
Warning: If you create the subdomain in Domains and also add an external record, the two conflict. Remove the cPanel subdomain first.
Wildcard subdomains
To catch every prefix, for example for a multisite network, create the domain *.example.com in Domains with a document root. Wildcard SSL is not covered by AutoSSL in all cases; ask support if you need it.
Troubleshooting
- Subdomain shows the main site: its document root is shared with the main domain. Click Manage and change it.
- DNS_PROBE_FINISHED_NXDOMAIN: the DNS record is missing or the domain does not use MdmHost nameservers. Add an
Arecord at your DNS provider. - 403 Forbidden: there is no index file in the folder yet. See fix 403 errors.
