When you add a new section to your website, you have two structural options: a subdomain that appears before your domain name (such as blog.example.co.uk), or a subdirectory that follows it (such as example.co.uk/blog). Choosing between them affects how your site is organised, how content is indexed by search engines and what technical access it has.
You will learn the difference between the two, when to use each and how to create them in cPanel.
What is a subdomain?
A subdomain is a prefix added to your domain name, separated by a full stop. It functions as an independent web address with its own file storage. When you create a subdomain in cPanel, it generates a new folder at your web root level – not inside public_html – and any files placed there are served exclusively from the subdomain URL.
Common uses for subdomains include staging environments (staging.example.co.uk), separate applications (shop.example.co.uk) and regional sites (us.example.co.uk). Search engines treat subdomains as separate websites, so content on a subdomain does not automatically inherit the authority of your main domain.
What is a subdirectory?
A subdirectory is a folder within your existing website’s document root. It shares the same web root as your main site, meaning it inherits the domain’s authority and is treated as part of the same website by search engines. Content at example.co.uk/blog contributes to the SEO profile of example.co.uk.
You create subdirectories using cPanel’s File Manager or by deploying your application to a subfolder of public_html. No additional DNS configuration is required.
When to use each
- Use a subdomain when the content is a separate application or site that should be treated independently – for example, a staging environment, a web app with a different technology stack, or a client area.
- Use a subdirectory when the content is part of your main website and you want it to benefit from your domain’s existing search presence – for example, a blog, a help centre or a landing page section.
Create a subdomain in cPanel
Subdomains are created from the Domains section of your cPanel account, which handles DNS and directory creation in one step.
- Log in to cPanel.
Access your account through your cPanel login page. - Open Domains.
In the cPanel dashboard, click Domains. - Add a subdomain.
Click Create A New Domain, enter the full subdomain address (for examplestaging.yourdomain.co.uk), and confirm the document root path. Click Submit.

cPanel creates the subdomain folder and the corresponding DNS record. The subdomain is ready to use once DNS propagates, which typically takes a few minutes on the same hosting account.
Create a subdirectory in cPanel
Subdirectories are folders inside your domain’s document root. You can create them in cPanel’s File Manager.
- Open File Manager.
In cPanel, click File Manager and navigate to thepublic_htmlfolder for your domain. - Create a new folder.
Click New Folder, enter the folder name (for exampleblog), and click Create New Folder. Files uploaded to this folder are served atyourdomain.co.uk/blog.
No DNS changes are needed for subdirectories. They are available immediately after creation.
Wrapping up
- Subdomains are independent web addresses suited for separate applications and staging environments.
- Subdirectories share your main domain’s web root and are better for content that should contribute to your site’s SEO profile.
For more domain management tasks, see our guides on adding domains in cPanel and creating a temporary domain for testing purposes. All of our cPanel hosting plans support unlimited subdomains and subdirectories.