How to Create and Manage Subdomains in cPanel.

PalmHost Logo

How to Create and Manage Subdomains in cPanel

As your online presence expands, you may find that a single website is no longer sufficient to house all your digital operations. Whether you are launching a dedicated customer support portal, testing a complete redesign of your primary website, or separating your corporate blog from your e-commerce store, creating a subdomain is often the most efficient structural solution.

When you complete your domain registration, you do not just secure the root name (such as yourdomain.co.za); you also gain the ability to create virtually unlimited sub-sections attached to that primary address (such as shop.yourdomain.co.za or staging.yourdomain.co.za). These subdomains function as completely independent websites, with their own file directories and databases, while still benefiting from the brand recognition of your main domain.

This comprehensive guide will explain the technical benefits of utilising subdomains, how they differ from standard folders, and provide a step-by-step tutorial on how to configure them directly within your PalmHost server dashboard.

Strategic Use Cases for Subdomains

Before diving into the technical setup on your web hosting package, it is helpful to understand when a subdomain is the right architectural choice for your business:

  • Staging and Development: This is the most common use case. If you are applying major updates or completely rebuilding your site, you should never work on the live version. By creating a staging.yourdomain.co.za subdomain, you can develop and test your new design privately without interrupting your live traffic.
  • E-Commerce Separation: Heavy e-commerce platforms like Magento or WooCommerce require significant server resources. By placing your store on shop.yourdomain.co.za, you can keep your main corporate site lightweight and fast, while isolating the complex transactional databases.
  • Localisation and Franchising: If your business operates in multiple regions, subdomains allow you to create tailored experiences. For example, capetown.yourdomain.co.za and durban.yourdomain.co.za can feature regional pricing and distinct content while remaining under your central brand umbrella.

Subdomains vs. Subdirectories: What is the Difference?

A common point of confusion is whether to use a subdomain (blog.yourdomain.co.za) or a subdirectory (yourdomain.co.za/blog). From a server perspective, the distinction is crucial.

A subdirectory is simply a folder located inside your primary website's public_html document root. It shares the exact same environment and often the same database as your main site. A subdomain, however, is treated by the server as an entirely separate entity. It is assigned its own unique document root folder (typically outside the main public_html folder). This isolation provides better security and performance management. If a plugin on your staging subdomain crashes, it will not bring down your main corporate homepage.

How to Create a Subdomain in Modern cPanel

In recent updates, cPanel has streamlined how domains and subdomains are managed. Instead of navigating to a dedicated "Subdomains" icon, all domain-related tasks are now handled within a unified interface.

Accessing the domain tools

Step 1: Log in to cPanel

Authenticate into your cPanel dashboard via the PalmHost Client Portal. Scroll down to the "Domains" section and click on the icon simply labelled Domains.

Initiating the setup

Step 2: Create a New Domain

On the right-hand side of the screen, click the blue button labelled Create A New Domain.

Defining the address

Step 3: Enter the Subdomain Name

In the "Domain" text field, type the complete address of your new subdomain (for example, test.yourdomain.co.za). Do not include "www" or "https://" in this field.

Isolating the directory

Step 4: Configure the Document Root

This is a critical security step. Ensure that the checkbox labelled "Share document root (/home/username/public_html) with main domain" is strictly UNTICKED. When you untick this box, cPanel will automatically generate a new, isolated folder path for your subdomain (e.g., /home/username/test.yourdomain.co.za). This guarantees your new project does not overwrite your existing live website.

Finalising the configuration

Step 5: Submit the Changes

Click the Submit button. The server will take a few moments to update your DNS zone and create the necessary folder structures. Once complete, you will see your new subdomain listed in the active domains table.

Securing Your New Subdomain with AutoSSL

Just like your primary website, your new subdomain requires encryption to prevent browsers from displaying a "Not Secure" warning. Fortunately, PalmHost's automated infrastructure handles this seamlessly.

When you create a new subdomain, the server's AutoSSL system automatically detects the new routing and requests a free security certificate. This process usually completes within 30 to 60 minutes. Before you install WordPress or upload custom files to your new subdomain, wait for the green padlock icon to appear in your browser when you visit the address. This ensures you can force HTTPS from the very beginning of your project.

Setting Up Dedicated Subdomain Email Addresses

One of the lesser-known benefits of isolated subdomains is that they can support their own unique email hosting infrastructure. For example, if you create a support portal at help.yourdomain.co.za, you can create specific email addresses such as [email protected].

To do this, simply navigate to the "Email Accounts" icon in cPanel, click "Create", and select your new subdomain from the dropdown list instead of your primary domain. This helps organise internal corporate communications and keeps distinct departments clearly separated.

Removing or Deleting a Subdomain

When you are finished with a temporary project—such as a staging site that has now been pushed to the live server—it is best practice to delete the subdomain to free up server resources and maintain a clean environment. Navigate back to the Domains interface in cPanel, locate the subdomain in the list, click the "Manage" button, and select "Remove Domain".

Important Notice: Deleting a subdomain from the Domains interface removes the DNS routing, but it does not automatically delete the physical files or the databases associated with it. You must manually open the File Manager and delete the subdomain's document root folder to fully reclaim your storage space.

When to Consider Managed Infrastructure

While creating multiple subdomains is a fantastic way to organise a growing digital presence, running several distinct WordPress installations on a single standard account can quickly exhaust your shared memory and CPU limits. If you find your staging sites or sub-portals are loading slowly, or if you are running resource-intensive enterprise applications, it may be time to upgrade.

Our managed hosting packages provide dedicated, isolated resources that allow you to run complex, multi-site networks without compromising on speed or reliability. You can learn more about our high-performance architecture on our about us page.

If you encounter any DNS propagation issues when creating your subdomain, or if the AutoSSL certificate fails to issue after a few hours, the PalmHost technical team is standing by. Visit our contact us portal to open a ticket, and we will manually force the certificate validation to get your new environment secure and online.

Please rate this article to help us improve our Knowledge Base.

0 0