Skip to content
SiteShiftCo

Subdomain

A prefix to a domain name (such as 'blog' in 'blog.example.com') that identifies a separate section of a website or a distinct service.

Also known as: sub domain, subdomain name

A subdomain is a prefix added to a domain name to identify a distinct section of a website or a separate service operating under the same parent domain. In blog.example.com, “blog” is the subdomain of example.com.

Subdomains are configured through DNS and can point to the same server as the main domain, a different server, or a third-party service.

How subdomains work

Each subdomain is configured by adding a DNS record (typically an A record or CNAME) at the registrar or DNS provider. For example:

  • example.com → server A (the main site)
  • www.example.com → server A (often a CNAME or A record matching the root)
  • blog.example.com → server B (perhaps a different platform or hosting provider)
  • app.example.com → server C (a web application)
  • mail.example.com → mail server
  • api.example.com → API server

The subdomains share the parent domain registration but can route independently.

Common subdomain conventions

SubdomainTypical use
wwwHistoric prefix for the main website; modern sites often redirect www to the root or vice versa
blogBlog or articles section, especially when hosted on a different platform
shopEcommerce store
appWeb application separate from the marketing site
apiAPI endpoints
docsDocumentation site
help or supportHelp center or knowledge base
mailMail server
ftp(Historical) FTP server
cdn or staticAsset delivery, often pointed at a CDN
staging or devStaging or development environments

These are conventions, not requirements; subdomains can be named anything.

Subdomains vs subdirectories

Two common ways to organize a website’s sections:

ApproachExampleConfiguration
Subdomainblog.example.comDNS record per subdomain; can point to different infrastructure
Subdirectoryexample.com/blogRouting within a single site

Subdomain advantages

  • Different sections can run on different platforms (marketing site on Webflow, blog on WordPress, app on a custom stack)
  • Hosting can be split for performance or organizational reasons
  • Different teams can manage different subdomains independently
  • Failures in one section do not affect others

Subdirectory advantages

  • All content shares the same domain authority for SEO purposes (subdomains are sometimes treated as separate sites by search engines)
  • Single hosting environment to manage
  • Easier internal linking and consistent navigation
  • Fewer DNS changes during structural reorganization

The SEO implications of subdomains vs subdirectories have been debated; current consensus is that Google treats subdomains as part of the same site in most cases, but the historical preference for subdirectories persists.

Wildcard subdomains

A wildcard DNS record (e.g., *.example.com) routes all subdomains not explicitly configured to a default server. This is common for:

  • Multi-tenant applications where each customer gets their own subdomain (e.g., customer1.example.com, customer2.example.com)
  • Catching typos or bot traffic
  • Dynamic subdomain creation in development environments

Wildcard subdomains require a wildcard SSL certificate to serve HTTPS for arbitrary subdomain names.

Subdomains and SSL certificates

By default, an SSL certificate covers a specific domain or list of domains. Common patterns:

  • Single-domain certificate. Covers example.com only
  • www included. Covers example.com and www.example.com (very common pattern)
  • Wildcard certificate. Covers *.example.com (any single subdomain)
  • Multi-domain (SAN) certificate. Covers a specified list of subdomains

Modern automated SSL (Let’s Encrypt) makes per-subdomain certificates straightforward, but wildcard certificates are useful for sites with many or dynamically created subdomains.

Sub-subdomains

Subdomains can be nested: dev.app.example.com has app.example.com as the parent and dev as the prefix. This is allowed but uncommon outside of large organizations or specific deployment patterns.

Common misconceptions

  • “www is required.” The www subdomain was historically conventional but is not required. Many modern sites use the root domain (example.com) as their primary address and redirect www to it, or vice versa. Either approach is fine; consistency matters.
  • “Subdomains are subsites.” Search engines typically treat subdomains of the same root domain as related, especially when ownership is clear.
  • “Setting up a subdomain requires a developer.” Adding a DNS record at most registrars or DNS providers takes minutes through a web interface.