Fundamentals / web addressesFree, no ads subdomains
Fundamentals
Updated Oct 22, 2026 · 5 min read

What Is a Subdomain?

TL;DR. A subdomain is the part before a main domain, such as docs.example.com. It gives one project or service a clear address without buying a separate domain. Use it for a portfolio, app, docs, or hosted website when its DNS target needs to stay separate.

A subdomain is a DNS label placed before a registered domain. In blog.example.com, example.com is the domain and blog is the subdomain. The label can route visitors to a different host, application, or server while still keeping the familiar main name. That is why subdomains are common for docs, stores, apps, and portfolios.

What is a subdomain compared with a domain

How is a subdomain different from a domain?

A domain is the name registered through a registrar, such as example.com. A subdomain is configured under that name by the domain owner. Registration, price, and ownership therefore belong to the domain; DNS routing and organization are the usual reasons to add a subdomain.

ComparisonDomainSubdomain
Exampleexample.comdocs.example.com
Registration1 registrar record0 extra registrations
DNS target1 primary zone1 or more records
Typical useBrand or main siteApp, docs, portfolio

When should you use a subdomain?

Use a subdomain when the destination needs a distinct technical boundary or a clear visitor purpose. It is not mandatory for every page. A normal page path, such as example.com/pricing, is often simpler when the content belongs to the same site and deployment.

How does a subdomain work in DNS?

DNS resolves the requested name by looking up records in the domain zone. A CNAME sends the subdomain to another compatible hostname; an A record maps it to a public IPv4 address. The record type must match the target supplied by your host. Cloudflare explains these record types in its official DNS documentation.

Read Cloudflare’s DNS record reference.

Frequently asked questions

Is a subdomain a separate domain?

No. It is a label under a registered domain and is controlled through that domain’s DNS settings.

Do I need a subdomain for every page?

No. Use a path for regular pages. Use a subdomain when an app, service, or host needs a separate address.

Can it point to another host?

Yes. A CNAME can point to a compatible host name, while an A record points to a public IPv4 address.

Continue learning

Want to use a subdomain?

Claim a free, no ads address for a legitimate project.

Claim a subdomain