Subdomain is a prefix added to a domain name that creates a distinct web address without requiring a new domain registration. www.yourdomain.com, blog.yourdomain.com, and app.yourdomain.com are all subdomains of yourdomain.com.
Subdomains are configured through DNS records (specifically, A records or CNAME records) and are free to create there is no registration fee beyond the base domain.
Common subdomain uses
| Subdomain | Typical purpose |
|---|---|
www.domain.com | Main website (www is technically a subdomain) |
app.domain.com | Web application, separate from marketing site |
blog.domain.com | Blog hosted on a different platform (Ghost, WordPress) |
help.domain.com | Help centre or documentation site |
api.domain.com | API endpoint |
mail.domain.com | Email server (often set automatically by email provider) |
staging.domain.com | Development/test version of the site |
shop.domain.com | E-commerce section on a different platform |
Subdomains vs subdirectories
A related distinction: blog.yourdomain.com (subdomain) vs yourdomain.com/blog (subdirectory). This choice has SEO implications:
Subdomain (blog.yourdomain.com):
- Search engines may treat as a partially separate entity
- Allows hosting blog on a completely different platform (Ghost, Webflow)
- DNS configuration routes the subdomain to a different server
- Useful when the technical architecture differs between sections
Subdirectory (yourdomain.com/blog):
- Treated as part of the main site by search engines
- All domain authority and link signals consolidated in one domain
- Typically preferred for SEO if the same hosting platform is used
- Simpler to configure if the blog is on the same server
For most businesses, subdirectory is preferred for SEO-important content. Subdomain is used when the content or application requires different hosting infrastructure.
How to create a subdomain
Subdomains are created through your DNS provider (wherever your nameservers are pointing typically your registrar, Cloudflare, or hosting provider).
To create blog.yourdomain.com pointing to a different server:
- Log into your DNS management interface
- Add a new A record (if pointing to an IP) or CNAME record (if pointing to a hostname):
- Type: A
- Name:
blog - Value:
185.199.108.153(the IP of your blog hosting) - TTL: 3600
- Configure your hosting provider to accept the subdomain (most require you to add the subdomain in their settings too)
- Wait for DNS propagation (1–4 hours for TTL-compliant propagation)
- If HTTPS is needed, obtain an SSL certificate for
blog.yourdomain.com(most providers issue via Let’s Encrypt automatically)
Subdomains and SSL certificates
SSL certificates issued for yourdomain.com do not automatically cover blog.yourdomain.com. Options:
- Wildcard SSL certificate: Covers
*.yourdomain.comvalid for any subdomain. Available from most certificate authorities (Let’s Encrypt, Cloudflare, commercial CAs). - Separate SSL certificate per subdomain: Each subdomain gets its own certificate. Automated via Let’s Encrypt/ACME protocol on most modern hosting.
- Cloudflare proxy: If using Cloudflare, SSL is handled automatically for all subdomains pointing through Cloudflare’s proxy.
See also: Nameserver · DNS propagation · TTL