Skip to content

If you manage a website, you will hear two words that sound similar: domain and subdomain. A colleague says "let's put the shop on a subdomain", an agency says "we will set up a staging subdomain", and a hosting guide tells you to "add an A record for the subdomain". It is easy to nod along without being sure what the difference is.

The difference is simple once you see it. A domain is a name you register and renew. A subdomain is a name you create beneath it, without buying anything new. That small difference has large practical effects. It changes what you pay, who controls what, how your records are organised and how search engines and customers see your sites.

This article explains both terms in plain language, shows how DNS treats them, and helps you decide when each is the right choice. It also covers the practical steps for creating a subdomain and the mistakes to avoid. If you are still choosing your main domain, the domain buying checklist covers that stage. If you want to confirm who controls the names you already have, see the domain ownership and admin checklist.

How a domain name is built

A domain name is read from right to left, and each part is separated by a dot. The structure is hierarchical, which is the central idea in RFC 1034. Take the name shop.example.com:

  • com is the top-level domain, the extension. The complete list of top-level domains is kept in the IANA root zone database.
  • example is the label you register under that extension. Together, example.com is the registered domain, which some people call the second-level domain or the root domain.
  • shop is a label placed in front of it. Together, shop.example.com is a subdomain of example.com.

Each dot-separated part is called a label. The tree can go deeper: uk.shop.example.com is a subdomain of shop.example.com, which is a subdomain of example.com. The format and limits of names, such as the length of a label, are defined in RFC 1035.

Two points follow from this structure.

First, the registered domain is the point where ownership is recorded. You register example.com with a registrar, and that registration names the holder. Everything beneath it, every subdomain, belongs to whoever controls example.com.

Second, the labels in front are yours to define. As long as you control the DNS for the registered domain, you can create as many subdomains as you need, subject to the limits of your DNS provider. Nobody else needs to approve them, and no registry is involved.

What a domain is, in practice

A domain is something you register. You pick an available name, you pay the registrar for a period, and you are recorded as the holder. You must renew it before the period ends. If you do not, you can lose it.

A domain gives you:

  • A name that is yours for the registration period.
  • The right to manage DNS for that name and everything beneath it.
  • A record in the registration system that identifies the holder. Our guide to WHOIS privacy explains what the public can and cannot see.

A domain does not give you a website or email by itself. Those come from services you connect to it.

What a subdomain is, in practice

A subdomain is a label you add in front of a domain you already own. It is created in DNS, not at the registry. To make shop.example.com work, you add a record in the DNS settings of example.com that says where shop should point.

A subdomain gives you:

  • A separate address under your existing brand.
  • The ability to point that address somewhere else, such as a different server or service, without moving the main site.
  • A way to organise different parts of your online presence.

A subdomain does not give you a separate legal registration. It cannot be sold, transferred or renewed on its own. It exists only as long as the parent domain exists and the record exists. If the parent domain expires, all of its subdomains stop working with it.

Side-by-side comparison

Point Domain Subdomain
Example example.com shop.example.com
Where it is created At a registrar In the DNS of the parent domain
Separate registration Yes No
Needs its own renewal Yes No, it follows the parent
Ownership record Registrant of the domain Same as the parent
Can point to a different server Yes Yes
Can be transferred on its own Yes No
How many you can create Limited by what you register As many as your DNS allows

The practical summary: a domain is an asset you own and renew, while a subdomain is an address you configure inside that asset.

How DNS treats subdomains

DNS stores records for each name. A record is a simple instruction that links a name to a value. The ones you meet most often with subdomains are:

Record Typical use for a subdomain
A Points the subdomain to an IPv4 address of a server
AAAA Points the subdomain to an IPv6 address
CNAME Makes the subdomain an alias of another name, often a service's address
MX Says which servers receive email for the subdomain, if you use email there
TXT Holds text values, such as verification codes for a service

When someone types shop.example.com, the resolver looks up the records for that exact name. It does not automatically use the records of example.com. This means each subdomain has its own settings. The main site can run on one server, the shop on another service entirely, and the help centre on a third.

A few details are worth knowing.

A CNAME is an alias, and it has rules. A name that has a CNAME should not carry other record types for the same name. This is a common source of mistakes when someone adds a CNAME at the same name as an email or text record. Providers handle the bare domain differently, so check how yours deals with an alias at the top of a domain.

A wildcard record can match many names. A wildcard entry answers for any subdomain that does not have its own record. It is handy but can hide typing errors, because every misspelt subdomain appears to work. Use it only if you have a reason.

Propagation takes time. After adding or changing a record, caches may keep the old answer for a while, according to the record's time-to-live value. Changes are not always instant everywhere.

When a subdomain is the right choice

Subdomains suit parts of the same business that need to live in a separate place. Typical cases:

  • A shop or booking system hosted on a specialised service while the main site stays elsewhere.
  • A help centre or knowledge base run on a support platform.
  • A staging or test site where you try changes before they reach customers.
  • A regional or language version with its own content, for example a section for a particular country.
  • An application such as a customer portal that runs on different technology from the marketing site.
  • A mail or tools service that your provider asks you to point at a particular address.

In all of these, the brand is the same and the organisation is the same, so using the existing domain keeps the address recognisable and avoids a new registration to manage.

Another benefit is trust. Customers who already know example.com are more likely to trust help.example.com than a different name they have never seen.

When a separate domain is better

A separate domain makes more sense when you need distance from the main site.

  • A different brand. If a product or company has its own identity, give it its own domain.
  • A different owner. If another organisation will control the site, a separate domain keeps the ownership clean. A subdomain would leave the parent domain's holder in control of its DNS.
  • A campaign with its own life. A short-lived campaign may be better on its own name that you can drop afterwards.
  • A risk boundary. If a site carries content you do not control, such as user-generated pages, a separate domain can limit the damage if something goes wrong. Browsers and security tools treat different registered domains as separate, while subdomains of one domain are closer relatives.
  • Defensive registrations. Variations and misspellings of your main name belong in the domain category, not the subdomain one, because their purpose is to stop others from taking the name.

Whichever you choose, keep a record of every name in use. A subdomain you forget about is a name you cannot manage.

Steps to create a subdomain

The details depend on where your DNS is managed, but the process is similar everywhere.

  1. Decide the name. Choose a short label that describes the purpose, such as one for a shop, help or staging. Use lowercase letters, digits and hyphens. Avoid label names that could be confused with others.
  2. Find where DNS is managed. The name servers listed on the domain show who answers for it. You make the change there, not necessarily at the registrar.
  3. Get the target. The service you are connecting will tell you either an IP address for an A record, or a hostname for a CNAME. Copy it exactly.
  4. Add the record. Enter the subdomain label, choose the record type, paste the value and save.
  5. Wait and test. Allow time for caches to refresh, then load the address in a browser, or use a lookup tool to check what the name resolves to.
  6. Set up security for the new address. If the subdomain serves web pages, it should use HTTPS, which needs a certificate that covers that name. A certificate for the main domain does not automatically cover every subdomain, unless it is a wildcard or lists the name.
  7. Update your records. Add the new subdomain, its purpose and who manages it to your documentation.

Mistakes to avoid

  • Forgetting that subdomains depend on the parent. If the main domain expires, every subdomain goes down with it, including the ones that run your shop and support.
  • Leaving dangling records. If a subdomain points to a service you stopped using, the record is still there. In some cases, another person can claim the old service address and show their content on your name. Remove records for services you no longer use.
  • Mixing up www and the bare domain. The version with www is itself a subdomain. Decide which one is canonical, make the other redirect to it, and make sure both resolve.
  • Creating subdomains for everything. A subdomain for every minor page makes the structure harder to manage and can confuse visitors.
  • Ignoring email on subdomains. If you send mail from a subdomain, it needs its own correct mail settings. Do not assume the parent's settings carry over.
  • Letting an outsider control DNS. Whoever edits your DNS can create or change any subdomain. Keep control in your hands or in an account you own.
  • Treating a subdomain like an independent asset. You cannot sell or move it separately, because it is part of the parent.

Search engines and users

Subdomains can raise questions about search and analytics. Search engines generally treat a subdomain as a site that is related to but separate from the main one, and the practical effect on visibility depends on many factors. There is no simple rule that one structure always performs better. A sensible approach is to choose the structure that fits how you manage the content, keep addresses stable once published, and redirect old addresses when you change them.

For users, clarity matters most. An address such as help.example.com tells visitors where they are. Keep the pattern consistent across your sites, so that people can guess your addresses.

Limits and what to watch for

  • A subdomain is not a security boundary on its own. Cookies and settings can sometimes be shared across subdomains of one domain depending on how they are configured. If separation matters, discuss it with whoever builds the sites.
  • Your DNS provider may set limits. Check the number of records and the supported record types on the plan you use.
  • Rules for some services are strict. Certain services expect a specific kind of record or a verification text entry before they will serve your subdomain. Follow their instructions exactly.
  • Check what the product page includes. Whether a given plan includes DNS management, and how, is described on the product page rather than assumed.

Summary

A domain is a name you register and renew. A subdomain is a label you add in front of it in DNS, with no separate registration. Subdomains suit shops, help centres, staging sites and regional versions of the same brand, while a separate domain suits a different brand, owner or risk boundary. When you create a subdomain, find where DNS is managed, add the correct record, test it, secure it with HTTPS and write it down. If you want to look for a main name or review the options, the domains page is a good place to start.

Frequently asked questions

What is the difference between a domain and a subdomain?

A domain is a name you register through a registrar, such as example.com. A subdomain is a name you create under a domain you already own, such as shop.example.com. You do not register a subdomain separately; you add it in DNS.

Do I have to pay for a subdomain?

A subdomain is created inside your existing domain's DNS settings, so it does not need a separate registration. Check your DNS or hosting provider for any limits or charges that apply to your own account.

Is www a subdomain?

Yes. The www label in www.example.com is a subdomain of example.com. It is a convention rather than a requirement, and many sites make both the bare domain and the www version work.

When should I use a subdomain instead of a new domain?

Use a subdomain when the new site belongs to the same brand and organisation, such as a shop, a help centre or a staging site. Choose a separate domain when you need a clearly separate brand.

Can a subdomain have its own website and email?

Yes. A subdomain can point to its own server, and it can have its own mail settings. Each one needs its own records, and you should treat the records as a part of the parent domain's setup.

About the author

Bob Kanokphon Thongdee, founder of XPASS VPN

Bob Kanokphon Thongdee

  • Founder of XPASS VPN
  • Co-founder of eSIMonline.asia
  • More than 7 years in online marketing
  • Founder of Cojourney Visa and Cojourney Travel

Ready to register your domain?

Search a name, compare extensions and pay once for the years you choose.

.com registration from $18.81 for the first year

Search domains

Keep reading

Domain & DNS Guides

Company Domain Ownership and Admin Checklist

Many companies discover too late that their domain sits in someone else's name. This checklist helps you verify ownership, admin access and recovery.

10 min read

Domain & DNS Guides

WHOIS Privacy Explained: Do Domain Owners Need It?

WHOIS privacy replaces your contact details in public domain records with a proxy. Learn what it hides, what stays visible and when it is worth having.

10 min read

Domain & DNS Guides

A Domain Buying Checklist for Business Owners

A domain is one of the few assets your whole business depends on. This checklist covers name, extension, ownership, renewal and records before you pay.

10 min read