Subdomain

Updated: July 15, 2026
By Willya Randika

A subdomain is a branch of your main domain, written as a prefix — for example blog.example.com or shop.example.com. The registrable domain stays example.com; the subdomain points somewhere else via DNS.

On hosting, subdomains are common for staging, shops, APIs, docs, or internal tools without buying another domain. Technically there is almost always an A or CNAME record steering that hostname to the right server or service.

A Simple Analogy

The main domain is the building address. A subdomain is a floor or unit number: same building, different entrance. Visitors to blog. do not automatically enter the main lobby unless you configure redirects or shared content.

Subdomain vs Addon Domain

SubdomainAddon domain
Shapeapp.example.comotherbrand.com
New domain purchase?NoYes
Document rootUsually a separate folderSeparate folder
Best forStaging, apps, site sectionsFully separate brands/sites

If the brand is truly separate and needs [email protected] mail, an addon domain is usually cleaner. If you only need a test environment or a module of the same product, a subdomain is lighter.

Typical cPanel Flow

  1. Open cPanelDomains / Subdomains
  2. Enter the prefix (staging, blog, api, …)
  3. Set the document root
  4. Confirm DNS (A/CNAME) was created or point it manually
  5. Issue SSL/TLS for that hostname

Then upload files or install a CMS into that folder — same workflow as a normal site, different hostname.

Healthy Usage Patterns

  • staging. or dev. for pre-production tests
  • cdn. or static. when assets are split (sometimes replaced by a real CDN)
  • mail. is rarely a public site; mail is mostly MX records
  • Do not leave staging open if it holds sensitive data

What to Watch For

  • SSL does not always cover every subdomain — check certs or wildcards
  • Public staging can be indexed unless you add noindex, basic auth, or robots rules
  • Subdomains share the same account limits (EP, disk, inodes)
  • Bad DNS means the subdomain fails even when the folder exists in File Manager

FAQ

Are subdomains free?

Creating them in DNS/hosting is usually free. You still pay for the parent domain and the hosting that stores the files.

Is www a subdomain?

Technically yes — www is a hostname under the root domain. Many setups redirect www and apex so one URL is canonical.

Can a subdomain live on different hosting?

Yes. Point that hostname’s records at another IP or service while the root stays elsewhere. Common for separate apps.

How many subdomains are safe on shared hosting?

Plan limits matter, but resources matter more. Several CMS installs on subdomains equal several sites on one account.

Disclaimer: Hosting Wiki articles are prepared for educational and reference purposes. Hosting technology keeps evolving, so some technical details may change over time.