A subdomain is a prefix added to your main domain, staging.yourdomain.com, shop.yourdomain.com, or app.yourdomain.com. cPanel creates the DNS record automatically when you create a subdomain and sets up a directory on your server to serve content for it. This guide covers creating subdomains, what to use them for, how to point them elsewhere, and how to clean them up properly.
Log in to cPanel and go to Domains → Subdomains (in older cPanel versions this is in the Domains section directly on the homepage). You'll see three fields:
Subdomain: Enter the prefix you want. Entering staging creates staging.yourdomain.com.
Domain: Select the domain from the dropdown if you have more than one on the account.
Document Root: cPanel auto-fills this as public_html/staging (using the subdomain name as the folder). You can change it to any path on your account. The default is fine for most purposes.
Click Create and cPanel does two things simultaneously: creates the directory on your server (public_html/staging/ in this example) and adds an A record in DNS pointing staging.yourdomain.com to your server's IP address. You don't need to manually add a DNS record. The subdomain is live as soon as DNS propagates, which typically takes a few minutes on cPanel-managed nameservers since cPanel has direct control over the zone file.
Staging environments: staging.yourdomain.com is the most common use case. Install a copy of your WordPress site there to test changes, plugin updates, or redesigns before pushing live. Most good hosts offer one-click staging built into their interface, but a manually created subdomain gives you full control over the environment and its WordPress configuration.
Separate applications: shop.yourdomain.com for a WooCommerce store, app.yourdomain.com for a web application, or blog.yourdomain.com if you want the blog on a different install from the main site. Each subdomain has its own document root, so you can install separate WordPress instances or any other application independently.
Client or user portals: portal.yourdomain.com or client.yourdomain.com for a section of the site that serves a different audience with different authentication requirements. This is cleaner than a subdirectory approach if the portal is a distinct application.
API endpoints: api.yourdomain.com for a separate API application or headless WordPress REST API endpoint, keeping API traffic on a different virtual host from the main site.
Subdomains are treated as separate sites by search engines. staging.yourdomain.com and yourdomain.com are distinct for SEO purposes, content on the subdomain does not automatically inherit the main domain's authority, and the subdomain is indexed separately unless you prevent it.
If your staging subdomain is publicly accessible, add a robots.txt file to the staging directory containing User-agent: * / Disallow: / to prevent crawling, or use a WordPress plugin to add a noindex header, or password-protect the subdomain using cPanel's Directory Privacy feature. A staging site being indexed creates duplicate content issues and potentially exposes unfinished work to visitors who find it via search.
For content subdomains (blog.yourdomain.com, shop.yourdomain.com), consider whether a subdirectory approach (yourdomain.com/blog/) would better serve your SEO strategy. Subdirectories inherit the main domain's authority more directly; subdomains are treated independently. For most use cases where you're building a real content section, a subdirectory is the better SEO choice. For genuinely separate applications or staging, subdomains are appropriate.
By default, the A record cPanel creates points your subdomain to the same IP address as your main domain. If you want to point a subdomain to a different server, a DigitalOcean droplet, a third-party SaaS tool, or any external IP, you need to edit the DNS record manually.
Go to cPanel → Domains → Zone Editor. Find the A record for your subdomain. Click Edit and change the IP address to the destination you want, then save. The change propagates through DNS within minutes on cPanel-managed nameservers.
Some external services (Shopify for a storefront, Intercom for a help centre, Webflow for a marketing page) provide CNAME values rather than IP addresses. In that case, delete the A record cPanel created for the subdomain and add a CNAME record pointing to whatever hostname the service specifies. You can't have both an A record and a CNAME for the same subdomain, delete the A record first.
Subdomains need their own SSL certificates. If your host provides cPanel AutoSSL or Let's Encrypt integration, new subdomains are usually issued a certificate automatically within a few hours of creation. Check in cPanel → Security → SSL/TLS Status to see which domains and subdomains have active certificates.
If AutoSSL isn't running on a subdomain, you can trigger it manually from the SSL/TLS Status page by clicking "Run AutoSSL." Ensure that the subdomain's document root has at least one file (even an empty index.html) before running AutoSSL, as the validation process needs to write a verification file to the document root.
For a subdomain pointing to an external server via A record or CNAME, the SSL certificate needs to be installed on the destination server, not on your cPanel account. AutoSSL won't issue for a subdomain whose DNS resolves to a different IP than your hosting account.
Go to cPanel → Domains → Subdomains. You'll see a list of all subdomains on the account. Click Remove next to the one you want to delete. cPanel removes the DNS record and the configuration entry, but it does not delete the document root directory, the folder and its contents remain on the server.
If you want to clean up the files too, delete the directory manually via File Manager or FTP after removing the subdomain. This is important if the subdomain contained a WordPress install with a database, delete the database separately via MySQL Databases in cPanel, otherwise it just sits there consuming storage and creating a potential security liability if the WordPress install isn't being maintained.
A subdomain (staging.yourdomain.com) is part of an existing domain; it uses the same registered domain and no additional domain registration is required. An addon domain is a completely separate domain (anotherdomain.com) that you host under the same cPanel account. Both get their own document root and both can host independent sites, but addon domains require a separately registered domain name while subdomains are free to create under any domain you already own.
Use a subdomain for a section or environment of your main site. Use an addon domain when you need to host a completely separate website with a different domain name under the same hosting account. If you're in the cPanel interface and trying to decide which option to use, the question is: does this need to be at yourdomain.com/something (subdirectory) or at something.yourdomain.com (subdomain) or at completelydifferent.com (addon domain)?
HostBible hosting includes standard cPanel with subdomain support, addon domains, Zone Editor, and SSL management included as standard.
View Hosting Plans