Subdomain
A subdomain is a prefix added in front of a root domain name, such as blog.example.com or shop.example.com, that creates a distinct address for a section of a website while staying under the same domain.
What is a subdomain?
Every domain name can host an effectively unlimited number of subdomains, each pointing to its own server, application or content, independent from the root domain and from other subdomains. The most common subdomain, www, is so widespread that browsers often treat www.example.com and example.com as interchangeable, though technically they are two separate addresses that both need to be configured to work.
How a subdomain works
A subdomain is created through a DNS record that points the prefix to a server, typically a CNAME record aliasing it to another hostname, or an A record pointing directly to an IP address:
blog IN CNAME example.com.
api IN A 203.0.113.42
Once the DNS record propagates, the subdomain resolves independently and can run entirely different software from the root domain, a WordPress blog on blog.example.com alongside a Webflow marketing site on the root, for instance.
Common subdomain use cases
- www: the conventional prefix for the main website, often redirected to or from the bare root domain.
- blog / shop / app: separates a distinct section or application from the main site, sometimes on different software entirely.
- staging / dev: a private, pre-production copy of a site for testing changes before they go live.
- api / cdn: a technical subdomain serving data or static assets, kept separate from the user-facing site.
- Country or language subdomains: fr.example.com for a French version, an alternative to a /fr/ subdirectory.
Subdomain vs subdirectory vs separate domain
| Aspect | Subdomain | Subdirectory | Separate domain |
|---|---|---|---|
| Example | blog.example.com | example.com/blog | blogexample.com |
| Technical setup | Requires its own DNS record and SSL | No extra DNS or SSL needed | Requires its own domain, hosting and SSL |
| Shares root domain authority | Mostly, with some independence | Fully | Not at all |
| Best for | A different platform or app than the main site | Content on the same platform as the main site | A fully independent brand or product |
Best practices and common pitfalls
A subdomain needs its own SSL certificate, or a wildcard certificate covering all subdomains, since a certificate issued for the root domain does not automatically cover blog.example.com. DNS changes can take anywhere from minutes to 48 hours to propagate fully, which sometimes causes a subdomain to appear broken for some visitors while working for others during that window. Running unrelated or low-quality content on a subdomain used to risk dragging down the root domain's reputation, though modern search engines evaluate most subdomains largely on their own merits today.
SEO considerations
The long-running debate between subdomains and subdirectories for SEO has mostly settled: Google treats both similarly well when the content and technical setup are solid, and the practical decision usually comes down to hosting and technical constraints rather than a guaranteed ranking difference. A subdirectory (example.com/blog) is generally simpler to set up when both sections share the same platform, while a subdomain makes more sense when a section runs on genuinely different software or infrastructure.
Subdomains at BeBranded
We configure subdomains and their DNS records as part of every website project that needs one, a staging environment, an app subdomain, or a documentation site, so the setup is correct on the first deploy.