How to Create a Subdomain in cPanel

As you’re building out your website and your brand, at some point, you may find yourself wanting to expand beyond your main domain: You can do this by creating a subdomain.

What is a Subdomain?

A subdomain is simply a new web name you create by adding a name in front of an existing domain name. For example, if the existing domain name is, then and are both subdomains.

Creating subdomains like this can be useful for partitioning web presences and activity.

Using the subdomain, for example, marketing can establish its own web presence and web content. On the other hand, visitors can still see there is a relationship with the parent site,

Alternative to Subdomains: Create a Subdirectory

Developing separate web presences and content can also be done using subdirectories.

Examples might be and Now it’s even clearer that marketing is part of, although marketing might find that the subdomain ( looks a little classier than the subdirectory (

In fact, that is often how subdomain content is organized for a given domain name and its website. Visitors see, but the web hosting server automatically serves visitors with content from the related (but hidden) subdirectory, (or a variation).

Subdomain vs Subdirectory: When to Use the Former

Is there any other reason for declaring a subdomain name like this?

Google, for example, no longer distinguishes between a subdomain and a domain in its search results. Any previous advantage in having lots of subdomains ranking for the same keyword has all but vanished. In fact, building up Google pagerank for content in a subdomain may take longer than if the content was explicitly declared to be in a subdirectory.

Subdomains and subdirectories may have some other technical pros and cons, but branding is currently the main reason to prefer subdomains over subdirectories.

Creating a Subdomain in cPanel

To create a subdomain in a hosting management application like cPanel is straightforward.

Step 1: Click “Subdomains” in cPanel’s Main Menu

The option is displayed clearly on the cPanel main sections page.


Step 2: Name Your Subdomain

The following screen will then be shown . In this case, the main domain name happens to be and is already suggested by cPanel as part of a dropdown list. We’ve filled in the subdomain name (hadley).

The document root is automatically filled in by cPanel as public_html/hadley. The public_html directory is where cPanel puts all the different subdomain content, and each subdomain maps onto a corresponding subdirectory.

Step 3: Click “Create”

Finally, click on the “Create” button and the subdomain will be created. We can now add content for the subdomain, starting with an index.html page, to the subdirectory.

Photo Sources:

Roberto Sanchez

Roberto Sanchez got his start with web hosting when he was still in high school, with a Perl script to conjugate verbs on a shared host. Roberto has been involved with web development ever since, experimenting with many web languages and hosting types. Roberto is on the web development team at Digital Brands Inc., where he applies his knowledge of PHP and WordPress to improve performance for the firm's various web properties. Roberto also leverages NodeJS to develop exciting products at Digital Brands Inc. and is eager to share his experience with users.