What Is a Subdomain? Definition, Examples, and When to Use One
Choose between a subdomain and subfolder using software, audience, and Search Console requirements.
You’ve probably noticed that URLs sometimes have an extra word before the main domain name. Instead of just example.com, you might see blog.example.com or shop.example.com. That extra word is called a subdomain.

Click from a homepage into the blog and the address might change from example.com to blog.example.com. You have not left the site. You have moved into a section the owner chose to run separately.
Understanding Subdomains
A subdomain is a prefix added to the front of a domain name that lets you run part of your site as its own section, like a blog, a store, or a help center.
Read a domain right to left and it comes apart in three pieces. In blog.example.com, com is the top-level domain, example is the second-level domain you registered, and blog is the subdomain sitting in front of both.
Creating the DNS record for a subdomain usually does not carry a separate registration fee. Your hosting provider or platform may still charge for the site, app, or service you run there. A separate domain, by contrast, must be registered on its own.
Is www a Subdomain?
Technically, yes. www is a subdomain like any other. It is a leftover convention from the early web, when it signalled which machine served the web pages as opposed to mail or files.
It carries no special weight now. example.com and www.example.com can serve identical pages, and most sites pick one version, redirect the other, and use a consistent canonical URL.
Why Use Subdomains?
A subdomain makes sense when a section of your site is different enough that it wants its own setup: a separate platform, a separate team, or a separate audience.
- A store on different software. Your main site runs WordPress and your shop runs Shopify, so the shop lives at
shop.example.com. - A help center or docs. Support content usually runs on its own tool, which is why so many are at
help.example.comordocs.example.com. - Language or region. Wikipedia does this at scale, with
en.wikipedia.orgfor English andes.wikipedia.orgfor Spanish. - Staging and test environments. These often sit on a subdomain like
staging.example.com. Protect them with authentication rather than relying on robots.txt or noindex as security.
The common thread: each one is genuinely its own thing. If a section is just more pages of the same site, a subdomain is usually more setup than it is worth.
How to Create a Subdomain
The exact screens depend on your host, but the shape is the same everywhere.
- Pick the name. Short and obvious beats clever.
blog,shop,help,docs. - Open your DNS settings. That might be cPanel, your host’s own dashboard, or your registrar if your DNS lives there. If you use Cloudflare, it is in the DNS tab.
- Add the record. Point the subdomain where it needs to go: an A record for an IP address, or a CNAME for another hostname, which is what most hosted platforms hand you.
- Wait for it to resolve. Usually a few minutes. It can take up to 24 hours if the old record was cached with a long TTL.
- Choose the right Search Console view. A Domain property for
example.comalready includes its subdomains. Add a separate URL-prefix property forhttps://blog.example.com/only when you want isolated reporting or settings. You can then submit the subdomain’s sitemap in the appropriate property.
Subdomain or Subfolder for a Blog?
This is the decision most people actually arrive here for, and the honest answer has two halves.
Google can crawl and index both subdomains and subfolders, and it does not document an automatic ranking penalty for either structure. That does not make the two setups operationally identical: a subdomain can have separate hosting, analytics, robots.txt rules, and Search Console reporting.
In practice, plenty of SEOs still report better results after moving a blog from blog.example.com to example.com/blog/. Those are observations rather than a documented rule, and a move like that usually comes bundled with other changes, so it is hard to credit the URL alone.
What that leaves you with is a practical test. If the content exists to support the main site and you want it feeding the same brand, put it in a subfolder. If it runs on different software, serves a different audience, or would happily stand alone, a subdomain is the cleaner choice. Do not move an established blog just because a checklist told you to.
Want to go deeper on how site structure affects rankings? Our SEO Mastery course is included for RightBlogger subscribers.
Automated SEO Blog Posts That Work
Try RightBlogger for free, we know you'll love it.
7-day free trial. Cancel anytime.




