How to create a subdomain in cPanel
A subdomain lets you publish a separate section of your site, such as blog.example.com, shop.example.com, or app.example.com, without registering another domain. In cPanel, you manage it from Domains, and it usually creates its own folder for that content.
Use it when you need to separate an app, landing page, store, or test environment from the main site. Before publishing, check the assigned folder, DNS, and SSL to avoid loading the wrong content or showing security warnings.
Before you start
- Have access to cPanel for the account where the main domain is hosted.
- Confirm that the main domain is already added and active in the account.
- Choose the subdomain name, for example
blog.example.com. - Decide which folder the subdomain will use to load content.
Create the subdomain in Domains
- Log in to cPanel.
- Open the Domains section.
- Click Create A New Domain or the equivalent option shown by your cPanel version.
- Type the full subdomain, for example
blog.example.com. - Check whether Share document root appears.
- For a subdomain with its own content, turn that option off before saving.
Older cPanel versions may still show a tool called Subdomains. If your panel still shows it, the goal is the same: enter the subdomain prefix, choose the main domain, and confirm the folder.
Check the document root
- Before confirming, review the Document Root field.
- Use a clear folder, for example
blogorpublic_html/blog, depending on how you organize your sites. - Avoid using the same folder as the main site if the subdomain will have different content.
- Save the change and wait for the cPanel confirmation.
- Open File Manager and confirm that the subdomain folder exists.
The document root is the folder from which the subdomain loads. If you upload files to another path, the browser may show a blank page, a 404 error, or the main site.
Publish files and check DNS
- Upload the subdomain content to the folder cPanel confirmed.
- If you are installing a CMS, Moodle, or another application, select that folder during installation.
- If the domain uses the hosting nameservers, cPanel usually creates the required DNS record for the subdomain.
- If DNS is managed at another provider, create an A or CNAME record so the subdomain points to the hosting account.
- Wait for DNS propagation before making final tests.
Do not change MX, SPF, or DKIM records if you only want to activate the web subdomain. Those records belong to email, and changing them can affect message delivery.
Enable SSL and test loading
- When the subdomain already resolves to the correct server, open SSL/TLS Status in cPanel.
- Check whether the subdomain appears with a valid certificate.
- If it is not active, run AutoSSL or use the available option to include the subdomain.
- Open a private browser window and visit
https://blog.example.com/. - Open an internal page or load a test file to confirm that you are seeing the correct folder.
AutoSSL can issue the certificate only when the subdomain points to the server. If DNS still points outside the hosting account, issuance can fail until you correct the active zone.
Verify that it is ready
- The subdomain appears in Domains inside cPanel.
- The document root matches the folder where you uploaded the files.
- The active DNS points to the correct hosting server.
- The subdomain opens with HTTPS and no browser warning.
- The displayed content belongs to the subdomain, not the main site.
Common errors
- The subdomain shows the main site: the share document root option stayed enabled or someone chose the wrong folder.
- The browser shows a DNS error: the subdomain does not have a DNS record in the active zone or propagation has not finished.
- AutoSSL does not issue the certificate: the subdomain still does not point to the correct server or an external proxy is blocking validation.
- The app was installed in the wrong path: check the document root and move or reinstall the application in the subdomain folder.
Recommended reading
Still need help?
If this guide didn’t solve your issue, our team can help you via ticket.