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
Section titled “Adding a Subdomain”-
Log in to cPanel.
-
On the Tools page → Domains section, click Subdomains.
-
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_htmlto avoid conflicts or security risks.
- Enter the subdomain prefix (e.g.,
-
Click Create.
-
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
Section titled “Redirecting a Subdomain”You can redirect visitors from one subdomain to another location.
Enable redirection
Section titled “Enable redirection”- Log in to cPanel → Subdomains.
- Under Modify a Subdomain, locate the subdomain → click Manage Redirection.
- Enter the destination URL.
- Click Save.
Disable redirection
Section titled “Disable redirection”- Log in to cPanel → Subdomains.
- Under Modify a Subdomain, locate the subdomain → click Manage Redirection.
- Click Disable Redirection.
Deleting a Subdomain
Section titled “Deleting a Subdomain”- Log in to cPanel → Subdomains.
- Under Modify a Subdomain, locate the subdomain → click Remove.
- 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.