---
title: How do I create a subdomain in cPanel?
description: Create a subdomain such as blog.example.com in cPanel, point it at the right folder, add your files, and secure it with an SSL certificate.
date: 2026-08-27
updated: 2026-08-27
tags: [subdomains, cpanel]
url: "https://drivenhost.com/kb/kb-create-subdomain-cpanel"
author: DrivenHost
---

A subdomain lets you run a separate site or section under a domain you already host, for example blog.example.com or shop.example.com. This guide covers creating one in cPanel, choosing where its files live, and getting a certificate onto it.

You will need your cPanel login and a domain that is already on your account. If the domain has not been added yet, add it first, then come back to this guide.

## Create the subdomain

1. Log in to cPanel.
2. In the Domains section, click **Domains**.
3. Click **Create A Domain**.
4. In the domain field, type the full subdomain you want, such as `blog.example.com`. cPanel fills in a document root for you, usually a folder named after the subdomain inside your home directory.
5. If you want the subdomain to have its own files, leave the option to share a document root with the parent domain switched off. Turn it on only when you want the subdomain to serve the exact same site as the main domain.
6. Adjust the document root if you would rather the files sat somewhere else, then click **Submit**.

cPanel creates the DNS record for you when the parent domain is using our nameservers. If the domain's DNS is managed somewhere other than your hosting account, cPanel cannot add that record, so you will need to create an A record for the subdomain wherever the DNS is hosted, pointing at the same IP address as your main site.

## Add your files

1. Open **File Manager** from the Files section.
2. Navigate to the document root you chose when creating the subdomain.
3. Upload your files there, or create them in place. The folder needs an index file (`index.html` or `index.php`) for the subdomain to show a page rather than a listing.

If you would rather install an application than upload files, open **Softaculous** instead and pick the subdomain from the domain list during setup. Softaculous installs into the subdomain's own folder and keeps it separate from your main site.

## Turn on SSL

1. Go to **SSL/TLS Status** in the Security section.
2. Find the new subdomain in the list.
3. Select it and run AutoSSL.

Issuing a certificate takes a few minutes, and it only works once the subdomain resolves publicly. Once it is done, load the subdomain over `https://` to confirm the padlock appears.

## If it didn't work

The subdomain does not load at all: DNS changes need time to spread, so give it a couple of hours. If the domain's DNS is managed away from your hosting account, check that you added the A record described above.

You see a file listing or a blank page: there is no index file in the document root, or the document root is not the folder you uploaded to. Check the path shown against the subdomain in the Domains screen.

AutoSSL will not issue a certificate: this usually means the subdomain is not yet resolving to the server, or a DNS record is pointing somewhere else. Wait until the subdomain loads over plain `http://`, then run AutoSSL again.

If it is still not behaving, open a ticket at [/support](/support) with the subdomain name and what you are seeing, and we will take a look.
