How to Set Up a Subdomain (blog, shop, api and more)

Back to Knowledgebase
Domains 3 min read 2 views Updated Jun 2026

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 blog and 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, not blog.yourdomain.com. Typing the full name creates blog.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.com pointing 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 CMS
  • shop. or store. for an online store
  • api. for an application backend
  • status. for a status page
  • app. 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.

Was this guide helpful? Our engineers are here 24/7 if you get stuck.