Ahosting Logo
Knowledge Base

How to Create and Manage Subdomains

A subdomain is a prefix added to your main domain, creating a separate section of your website. For example: blog.example.com or shop.example.com.

Common Uses for Subdomains

  • blog.example.com - Blog or news section
  • shop.example.com - E-commerce store
  • staging.example.com - Development/testing site
  • support.example.com - Help desk or support portal
  • members.example.com - Members-only area

Creating a Subdomain

  1. Log into cPanel
  2. Go to Domains section
  3. Click Domains
  4. Click Create A New Domain
  5. Enter the full subdomain (e.g., blog.example.com)
  6. The document root is auto-filled
  7. Click Submit

Alternative Method (Subdomains Tool)

In some cPanel versions:

  1. Go to Domains > Subdomains
  2. Enter subdomain name (just the prefix, e.g., blog)
  3. Select the parent domain
  4. Document root auto-fills
  5. Click Create

Subdomain Directory Structure

By default, subdomains are created in:

public_html/subdomain_name

Example: blog.example.com > public_html/blog

Installing WordPress on a Subdomain

  1. Create the subdomain first
  2. Go to Softaculous Apps Installer
  3. Select WordPress
  4. Choose your subdomain from the dropdown
  5. Complete the installation

SSL for Subdomains

AutoSSL automatically covers subdomains. To verify:

  1. Go to Security > SSL/TLS Status
  2. Find your subdomain in the list
  3. If not secured, click Run AutoSSL

Creating Email for Subdomain

You can create email addresses using the subdomain:

  1. Go to Email > Email Accounts
  2. Click Create
  3. Select the subdomain from the domain dropdown
  4. Example: [email protected]

Wildcard Subdomains

A wildcard subdomain (*.example.com) directs all undefined subdomains to one location. This is useful for multi-tenant applications.

  1. Create a subdomain with * as the name
  2. Point to desired document root

Removing a Subdomain

  1. Go to Domains
  2. Find the subdomain
  3. Click Manage > Remove

Note: Files in the subdomain folder are not deleted automatically.

Subdomain vs Addon Domain

Subdomain Addon Domain
Uses your main domain Completely separate domain
No extra domain registration Requires domain registration
Example: blog.example.com Example: otherdomain.com