Subdomains explained
What subdomains are, how they work, common uses, and how to create one on your domain.
- Difficulty
- Beginner
You've probably seen web addresses like shop.yourbusiness.com or blog.yourbusiness.com. The part before the dot — shop or blog — is a subdomain. This guide explains what subdomains are and when they're useful.
Quick summary
A subdomain is a prefix added to your domain name that creates a separate, but related, address. For example, shop.yourbusiness.com is a subdomain of yourbusiness.com. Subdomains are free to create and can point to different servers or services than your main site.
What is a subdomain?
A subdomain is an extension of your domain name that sits to the left of the main domain. Your root domain is yourbusiness.com. A subdomain adds a prefix:
www.yourbusiness.com— the most common subdomain (thewwwprefix)shop.yourbusiness.com— might host an e-commerce storeblog.yourbusiness.com— might host a blog on a different platformapp.yourbusiness.com— might host a software applicationmail.yourbusiness.com— often the name of a mail server that your MX records point to
You can create as many subdomains as you need. They're free — you don't pay extra to use them, and you don't need to register them separately. Each one is just a record in your DNS, so the only real ceiling is however many records your DNS provider allows.
How subdomains work
A subdomain is just a DNS record. To create one, you add an A record or CNAME record for the subdomain in your DNS settings.
For example, to create shop.yourbusiness.com, you'd add a DNS record:
| Name | Type | Value |
|---|---|---|
shop | A | IP address of the shop server |
Or, if the shop platform provides a URL rather than an IP address:
| Name | Type | Value |
|---|---|---|
shop | CNAME | shops.platform.com |
The subdomain can then point to a completely different server or platform than your main website.
Common uses for subdomains
| Subdomain | Common use |
|---|---|
www | The standard prefix for a website — nearly always set up |
shop | A separate e-commerce store |
blog | A blog hosted on a different platform |
app | A web application or client portal |
support | A help desk or support portal |
mail | Often the name of a mail server that MX records point to |
m | Mobile-specific version of a site (less common now) |
staging | A test/staging version of the site |
Subdomains vs subdirectories
You can structure your site in two ways:
| Approach | Example | Good for |
|---|---|---|
| Subdomain | blog.yourbusiness.com | Different platform, different team |
| Subdirectory | yourbusiness.com/blog | Same site, same platform |
You'll read a lot of confident SEO advice on this. Google's own guidance doesn't crown a winner. It recommends "creating a simple URL structure" and organising content "so that URLs are constructed logically and in a manner that is most intelligible to humans." Where Google does compare the two directly — for country and language versions of a site — it lists both as easy to set up, and the trade-off it names is practical rather than about ranking: a subdirectory is lower maintenance because everything is on the same host, while a subdomain makes it easier to keep the two sites separate and to run them on different servers.
For most clients the practical side decides it: a subdirectory keeps everything on one site, one certificate, and one set of tools, which is usually simpler for something like a blog. Subdomains make more sense when the content is genuinely separate — a different platform, a different product, a different team.
Common questions
Do subdomains cost money?
No. Subdomains are just DNS records and are free to create. You don't register them separately.
Do I need SSL for each subdomain?
Yes — your SSL certificate needs to cover each subdomain visitors use. A wildcard certificate (*.yourbusiness.com) covers one level of subdomain: it matches shop.yourbusiness.com, but not a deeper name like uk.shop.yourbusiness.com. Cloudflare's free certificates work the same way, covering the root domain and first-level subdomains on a normal setup. If a subdomain shows a security warning, the certificate probably doesn't cover it.
Is 'www' a subdomain?
Technically, yes. www.yourbusiness.com is a subdomain of yourbusiness.com. Most sites set up both and redirect one to the other. See www vs non-www.
Can subdomains have their own email addresses?
Technically, yes — but this is uncommon and complex. Most businesses keep email on the root domain (@yourbusiness.com), not on subdomains.
Related guides
- www vs non-www
- DNS records explained (A, CNAME, MX, TXT)
- Pointing your domain to a new site
- What is DNS?
Need a hand?
Last updated
Nameservers vs DNS records
The difference between changing nameservers and editing individual DNS records — and when to use each approach to manage where your domain points.
www vs non-www
Whether your URL starts with www or not — does it matter for SEO, visitors, or your website? This guide explains the difference and what to choose.