๐Ÿ“
Blog articleA deep-dive guide from the Domain Extractor Online team. Links back to the tool at the bottom.

Root Domain vs Subdomain โ€” The Complete Guide

Published August 27, 2026 ยท 10 min read ยท By Domain Extractor Team

"Is blog.example.com a different domain than example.com?" That single question hides most of what makes DNS confusing. This guide answers it definitively โ€” with examples, SEO implications, and the reason why co.uk and github.io don't behave the way you'd expect.

Quick answer

  • example.com is a root domain (also called the "registrable" or "apex" domain).
  • blog.example.com is a subdomain of example.com.
  • DNS treats them as separate hosts. SEO treats them as related but not identical.
  • Multi-part suffixes like .co.uk and github.io change the answer โ€” see the Public Suffix List section.

1. The DNS hierarchy

DNS is a tree. Each dot moves you one level up. Reading right to left:

          .           โ† root (invisible; the trailing dot no one types)
          |
         com          โ† top-level domain (TLD)
          |
       example        โ† the label registered with a registrar
       /    \
     blog   shop      โ† subdomains (created by the owner)
      |
    2024              โ† sub-subdomain

The full name reading bottom-up: 2024.blog.example.com. Each level below example.com is created and controlled by whoever owns example.com โ€” no need to talk to a registrar.

2. What can you actually own?

When you buy a domain, you're leasing a specific label under a specific TLD. In the diagram above, the buyer registered example under com, giving them ownership of example.com plus everything underneath it. So a subdomain like blog.example.com is not something you buy separately โ€” it's something you create with a DNS record after you already own the parent.

The technical name for the shortest domain you can actually register is the registrable domain. For a.b.c.example.com, the registrable domain is example.com. This distinction matters more than it sounds โ€” see the SEO section below.

3. Types of "subdomain" people talk about

ExampleAlso calledCommon purpose
www.example.comCanonical / bare-domain redirectLegacy convention; most sites now serve both example.com and www.
blog.example.comContent subdomainSeparate blog CMS from main product
api.example.comService subdomainCleanly separate API from marketing site
shop.example.comProduct subdomainDifferent tech stack (e.g. Shopify)
de.example.com, fr.example.comccTLD alternativeLanguage variants without country-code domains
staging.example.comEnvironmentNon-production deployment
tenant1.example.comMulti-tenantSaaS with per-customer subdomain

4. The Public Suffix List โ€” where intuition breaks

The naive rule "the registrable domain is the last two labels" is wrong for a huge fraction of the internet. Consider:

  • example.co.uk โ€” you register the whole example.co.uk. The last two labels would give you co.uk, which nobody can own.
  • user.github.io โ€” GitHub owns github.io and gives each customer a subdomain. The "domain" a specific user controls is user.github.io, not github.io.
  • myapp.appspot.com โ€” same pattern for Google App Engine.
  • example.pvt.k12.ma.us โ€” the US education namespace goes really deep.

The Public Suffix List (PSL) is a Mozilla-maintained community list of every "public" prefix โ€” the parts of the DNS tree under which anyone can register a subdomain. Once you know the PSL, the rule becomes:

The registrable domain is the longest matching public suffix, plus one more label to the left.

Applying the rule:

HostnamePublic suffixRegistrable domain
www.example.comcomexample.com
a.b.example.co.ukco.ukexample.co.uk
alice.github.iogithub.ioalice.github.io
staging.myapp.appspot.comappspot.commyapp.appspot.com

5. Why cookies care about this

Browsers use the PSL to decide whether one host can set a cookie for another. Without the PSL, an evil site at attacker.co.uk could set a cookie for .co.uk, which would then be sent to every other .co.uk site. The PSL tells the browser "co.uk is a public suffix โ€” nobody can set cookies at that level." That's the entire reason the PSL exists โ€” cookie safety.

6. SEO implications

Google has been consistent for years that subdomains and root domains are treated as separate sites for indexing purposes, but with an important nuance: quality signals can flow between them when they clearly belong to the same owner. Some practical takeaways:

  • Subdomain vs. subfolder: blog.example.com vs example.com/blog. Google can rank either. Subfolders tend to consolidate authority more easily; subdomains give you infrastructure independence (different servers, CMS, subteam ownership).
  • Google Search Console: Each subdomain needs its own property (or use a domain property, which covers all subdomains under one registrable domain).
  • Google Disavow: Uses registrable domain semantics โ€” domain:example.co.uk disavows the whole registrable, not just www..
  • hreflang & canonical: These are host-specific. example.com and www.example.com are separate hosts that need a canonical to unify them.
  • Referring domain deduplication: When you export backlinks from Ahrefs or Semrush, you almost always want to dedupe by registrable domain rather than by hostname โ€” otherwise 12 subpages of one bad linker looks like 12 different "referring domains".

7. When you want root vs when you want subdomain

Use registrable-only (root) mode when:

  • Building a Google Disavow file
  • Counting unique "referring domains" for SEO reporting
  • Matching leads to company accounts in a CRM (all emails from @sub.acme.com, @team.acme.com, etc. should map to one Acme record)
  • Firewall rules where you want to block/allow at the whole-company level

Keep subdomains when:

  • Attack-surface mapping โ€” you want to know every host, not just root
  • Subdomain enumeration for security recon
  • CDN/infrastructure inventory (every cdn., static., media.)
  • Debugging routing (each api., staging., dev. matters)

8. Get the right answer, fast

Rather than implementing PSL logic yourself, use one of our specialised tools:

9. FAQ

Is www. a subdomain?
Technically yes โ€” www.example.com is a subdomain of example.com. In practice most sites set up a DNS record so both hosts serve the same content, plus a 301 redirect from one to the other to consolidate SEO.
Does Google penalize me for using subdomains?
No. Subdomains and subfolders are both fine โ€” the decision should be based on your architecture and team ownership, not SEO myth. That said, subfolders tend to consolidate authority more automatically.
Can I get a "root domain" without www.?
Yes. Set up an A or ALIAS record for the apex (bare domain). Note that some legacy DNS providers require CNAME for the apex, which isn't standard-compliant โ€” check for CNAME-flattening or ALIAS record support.
How many subdomains can I have?
Effectively unlimited โ€” you can add DNS records for as many as you want. Practical limits come from your DNS provider (some cap free plans at 20-100 records) and CA/SSL costs if you need HTTPS on each.

Further reading