# Managing subdomains in cPanel

> Create, redirect and delete subdomains in cPanel to give parts of your website, such as a blog or shop, their own address.

Source: https://helpcenter.ruachost.com/cpanel/domains/managing-subdomains-in-cpanel/

A **subdomain** is a domain that is part of a larger domain, based on a prefix you choose. For example, if your main domain is `example.com`, you might create a subdomain `support.example.com` for your support portal.

Subdomains are useful for creating separate areas of your website, such as blogs, shops, or departments, each accessible via its own URL.

## Adding a Subdomain

1. Log in to **cPanel**.
2. On the **Tools page → Domains section**, click **Subdomains**.
3. Under **Create a Subdomain**:

   - Enter the subdomain prefix (e.g., `support`).
   - cPanel automatically fills in the **document root path** (where files will be stored).
   - Best practice: Place the subdomain’s files in a **dedicated directory outside** `public_html` to avoid conflicts or security risks.
4. Click **Create**.
5. Upload your site files into the subdomain’s document root.

 Reserved names: Do not use `cpanel`, `ftp`, `mail`, `webdisk`, `webmail`, `secure`, `www`, or `whm` as subdomain prefixes.

## Redirecting a Subdomain

You can redirect visitors from one subdomain to another location.

### Enable redirection

1. Log in to **cPanel → Subdomains**.
2. Under **Modify a Subdomain**, locate the subdomain → click **Manage Redirection**.
3. Enter the destination URL.
4. Click **Save**.

### Disable redirection

1. Log in to **cPanel → Subdomains**.
2. Under **Modify a Subdomain**, locate the subdomain → click **Manage Redirection**.
3. Click **Disable Redirection**.

## Deleting a Subdomain

1. Log in to **cPanel → Subdomains**.
2. Under **Modify a Subdomain**, locate the subdomain → click **Remove**.
3. Confirm by clicking **Delete Subdomain**.

 Note: Deleting a subdomain does **not** delete its folder or files. You must remove them manually if no longer needed.

##

> **Important Notes:**
- DNS changes when you create a subdomain may take up to **24 hours** to propagate.
- Avoid hosting sites in subdirectories under `public_html` to reduce risks of conflicts or hacks.
- Use subdomains for clear separation of site areas (e.g., `blog.example.com`, `shop.example.com`).

##
