A subdomain is a prefix on your domain, like blog.yourdomain.com or shop.yourdomain.com. It lets you run a separate site or service under the same brand without buying another domain. Setting one up takes two steps: a DNS record, then pointing it at some content.
What a subdomain is (and is not)
yourdomain.com is your domain. Anything before it, separated by a dot, is a subdomain: blog., shop., api., mail. and so on. Even www is just a subdomain. They are free to create and you can have as many as you like. A subdomain is different from a subfolder (yourdomain.com/blog); a subdomain is treated more like its own separate site.
Step 1: Add the DNS record
Decide where the subdomain should point.
- Pointing to a server IP: add an A record with the host set to the subdomain (for example
blog) and the value set to the server's IP. - Pointing to another hostname (a platform, a CDN, a page builder): add a CNAME record with the host
blogand the value the target hostname they gave you.
That is the whole DNS part. New to records? See DNS records explained.
You only set the prefix in the host field. Most control panels add the rest of the domain for you, so you type
blog, notblog.yourdomain.com. Typing the full name createsblog.yourdomain.com.yourdomain.com, a very common mistake.
Step 2: Point it at content
Once DNS resolves, tell your server what to serve for that subdomain.
- On a control panel (cPanel, DirectAdmin, Plesk): use the Subdomains or Domains section to create the subdomain, which also makes a folder for its files.
- On a VPS with Nginx: add a server block with
server_name blog.yourdomain.compointing at its own folder. See How to host a website on a VPS with Nginx.
Step 3: Add HTTPS
A subdomain needs its own certificate, or a wildcard that covers it. Issue a free certificate for the subdomain the same way you would for the root domain. See How to get a free SSL certificate.
Common uses
blog.for a separate blog or CMSshop.orstore.for an online storeapi.for an application backendstatus.for a status pageapp.for a web app, kept separate from the marketing site
FAQ
Is a subdomain free?
Yes. You can create as many subdomains as you want on a domain you own, at no extra cost.
Subdomain or subfolder, which is better?
It depends. Subfolders (/blog) share authority with the main site and are simpler. Subdomains (blog.) are better when the content is a distinct app or platform. Both are valid.
How long until my subdomain works?
The same as any DNS change: usually 30 minutes to a few hours, and up to 48 worldwide.
Need a hand wiring one up? Contact support and we will get your subdomain live.