Blog · WebJi® India

What Is a Subdomain? Uses & Examples

Quick answer: A subdomain is a prefix on the left of your domain, such as blog.example.com, that points to its own server, folder or app. DNS resolves it separately, its cookies can be scoped to itself, and Google treats the hostname as a distinct site.
✓ In business since 2005✓ INR + GST billing✓ 24/7 Email Support — avg reply < 60 min
Close-up of rack-mounted servers with glowing blue and green status LEDs, shallow depth of field — what is subdomain

A subdomain is a prefix added to the left of your registered domain, as in blog.example.com, that can point to a different server, folder or application. It keeps the parent domain in the address while behaving as its own hostname for DNS, TLS, cookies and search engines.

Subdomain Anatomy: What the Prefix Means in a URL

A hostname reads right to left: the top-level domain, then your registered name, then any labels in front of it. In blog.example.com the label "blog" is the subdomain and the full string is the hostname the browser resolves. "www" is a subdomain too, which is why www.example.com and example.com are two addresses until a redirect joins them.

  • Each label may hold letters, digits and hyphens, up to 63 characters.
  • Subdomains nest: dev.blog.example.com is valid and allowed.
  • Depth costs typing and trust, so most sites stop at one level.

How DNS Records Point a Subdomain Somewhere

A subdomain resolves through a record of its own: an A record for an IPv4 address, AAAA for IPv6, or a CNAME that aliases it to another hostname. The record lives in the DNS zone of the parent domain, which is why whoever runs that zone controls every subdomain.

A CNAME cannot share its name with any other record at that label. That rule explains most surprises: mail on a subdomain needs an MX record, and an MX record cannot sit on a name that is already a CNAME. The TTL decides how long resolvers cache the answer, so plan changes around it.

The record types you will meet are covered in the DNS records explained guide.

Do Cookies Set on a Subdomain Reach the Main Domain?

By default, no. A cookie set by blog.example.com without a Domain attribute is host-only and is never sent to example.com or to a sibling subdomain. Adding Domain=.example.com makes it readable by every host under that domain, which is the setting that decides whether a login carries across.

Two other attributes matter. Secure keeps the cookie on HTTPS only, and SameSite controls whether it travels with cross-site requests. A portal on portal.example.com that must share a session with the main site needs the parent-domain cookie; an app that should not share one is better left host-only.

Subdomain vs Subdirectory: What Google Does Differently

Google treats each hostname as its own site. Pages on blog.example.com are crawled, indexed and ranked separately from example.com, and links earned by one hostname do not automatically lift the other. A path such as example.com/blog keeps every signal on one hostname, which is why most content belongs in a folder.

SubdomainSubdirectory
Exampleblog.example.comexample.com/blog
Ranking signalsKept on that hostnameShared with the whole domain
CookiesHost-only unless scoped to the parentSent with every request to the domain
Best forA separate app, platform or teamContent about the same business

A subdomain can still rank well on its own, and it can outrank the main site for its own topics. What it will not do is inherit authority it never earned, so treat it as a new site with a shared brand.

Common Subdomain Uses: Blog, Store, Staging and Help

The usual cases are a shop on another platform, a blog run in a different CMS, a help centre, a customer portal, a staging copy and language or region variants. Each exists because the application needs its own document root, its own server, or its own release schedule.

Staging deserves a warning: staging.example.com that is publicly reachable and indexable competes with the live site for the same content. Put it behind HTTP authentication and a noindex header before the first deploy.

How to Create a Subdomain in cPanel

In cPanel open Domains, choose Create A New Domain, type the full name such as blog.example.com, confirm the document root, and submit. cPanel writes the DNS record and the virtual host, then you upload files or run an installer into that folder.

  1. Confirm the parent domain is already on the account and its nameservers point at the host.
  2. Leave the document root at the suggested path, outside public_html, unless you have a reason.
  3. Open the new address in a browser and expect a default page or a 403 until content exists.
  4. Issue or check the certificate, then install the app.

The same panel hosts the parent site, so a WebJi cPanel hosting account can carry several subdomains without a new plan.

SSL Certificates for Subdomains

A certificate issued for example.com does not cover blog.example.com unless the subdomain is listed as a subject alternative name or the certificate is a wildcard for *.example.com. Browsers reject the mismatch with a name error, not a warning you can click through.

cPanel's AutoSSL issues a separate certificate per subdomain, so a new one is usually secured within minutes. A wildcard certificate needs DNS-01 validation, which is why it is usually a paid option rather than an automatic one.

Wildcard Subdomains and When to Use Them

A wildcard record, *.example.com, answers for any name that has no record of its own. It suits multi-tenant apps that hand every customer a hostname, such as a store per client, without adding a DNS record for each signup.

The DNS record is only half the job: the web server still has to route each hostname to the right content, and the certificate still has to cover it. A wildcard DNS entry with no matching virtual host produces a default page or an error, not a working site.

Subdomain SEO Checklist Before You Launch

Treat the subdomain as a separate site. Give it its own titles and content, submit a sitemap for that host, add it to Search Console, and link to it from the main navigation so crawlers find it.

  • Canonicals on the subdomain point to the subdomain, never back to the parent.
  • robots.txt and noindex rules are checked per host, because they do not inherit.
  • HTTPS is enforced with a redirect from http, and mixed content is removed.
  • Analytics and Search Console cover the hostname, or its traffic will look like a drop.

The parent domain is registered once at the registrar; subdomains are free additions to it. Domain registration in India covers that first step.

Frequently Asked Questions

What is a subdomain with an example?

It is the label left of your registered domain, as in shop.example.com, where shop is the subdomain. The address keeps the parent brand while pointing at its own folder, server or application.

Is a subdomain or a subfolder better for SEO?

A subfolder keeps links and rankings on one hostname, so it suits content about the same business. A subdomain is better when the section is a separate app, platform or brand that needs its own stack.

Do subdomains cost extra?

No. A subdomain is created inside the DNS zone of a domain you already own, so registrars do not charge for it. Your host may limit how many the plan supports or charge for extra certificates.

Does Google treat subdomains as separate sites?

Largely yes. Google crawls and ranks each hostname on its own, so a subdomain does not inherit the parent's links or rankings, though the shared brand still helps.

What is a wildcard subdomain?

A DNS record for *.example.com that answers any name without its own record. It is used for multi-tenant apps, and it still needs a matching certificate and server configuration.

How long does a subdomain take to work?

The record propagates within its TTL, often minutes and rarely more than a few hours. If it still fails, check that the A or CNAME record exists and that the virtual host is configured.

Need help with this?

WebJi® support does it for you — free. Talk to our Jaipur team →