Root Domain vs Hostname vs Subdomain

Understand the difference between a registrable root domain, hostname and subdomain—and choose the correct output for audits, migrations and research.

FlashDomains Editorial·August 21, 2026·7 min read

example.com, blog.example.com and https://blog.example.com/guides are related, but they are not interchangeable. The first is a registrable root domain, the second is a hostname containing a subdomain, and the third is a complete URL.

Choosing the wrong boundary can distort an audit. Collapsing every hostname hides infrastructure. Keeping every hostname can make one organization look like dozens of independent websites. The domain extractor supports both views so the output can match the question.

The three terms in one example

TermExampleWhat it identifies
Root or registrable domainexample.co.ukThe name registered beneath a public suffix
SubdomainsupportA label controlled beneath the registered domain
Hostnamesupport.example.co.ukThe complete host used by a network service
URLhttps://support.example.co.uk/loginA specific resource and access method

The visual guide to domain-name parts explains labels and suffixes in more depth. The key point is that the root boundary cannot be inferred by counting dots. In example.co.uk, the public suffix contains two labels.

When should you extract root domains?

Use root domains when you need one record per registrable website or organization. This is usually the right choice for referring-domain counts, prospect grouping, competitor lists and broad ownership research.

  • Ten links from different pages on news.example.com become one example.com record.
  • shop.example.com and blog.example.com are grouped together.
  • Frequency counts show concentration without producing duplicate rows.

When should you keep full hostnames?

Use hostnames when the labels before the root domain carry operational meaning. Migration teams need to distinguish a storefront from an API. Security analysts may need the exact suspicious host. International sites may separate markets with uk.example.com and ke.example.com.

Repeatable process

Choose the correct level of a domain name

Start with the question, then preserve only the labels needed to answer it.

  1. 1

    Identify the complete hostname

    Remove protocol, credentials, port, path, query and fragment from the URL.

  2. 2

    Locate the public suffix

    Use suffix rules to recognize endings such as com, co.uk and com.au correctly.

  3. 3

    Derive the registrable domain

    Keep the label immediately before the public suffix together with that suffix.

  4. 4

    Preserve subdomains when relevant

    Keep the remaining labels for infrastructure, migration or security analysis.

Side-by-side

Domain-name levels at a glance

The same URL produces several valid labels, each suited to a different task.

DecisionValueUse it for
Hostnameapi.eu.example.co.ukHosts, services and environment boundaries
Registrable domainexample.co.ukOrganizations, sites and referring-domain counts
Subdomainapi.euThe labels operating below the registrable domain

Where it helps

When the distinction changes the result

Use the cleaned output as a focused input to the next analysis—not as a substitute for that analysis.

SEO reporting

Group links by registrable domain without inflating counts for each subdomain.

Site migration

Preserve every production, staging, regional and service hostname.

Cookie scope review

Understand which hosts may share domain-level browser policies.

Security inventory

Separate registrable ownership from the individual hosts exposed to users.

Worked example

Break down one multi-part domain

Input

https://api.eu.example.co.uk:443/v2/users?page=3

Result

Hostname: api.eu.example.co.uk
Root domain: example.co.uk
Subdomain: api.eu

The path, port and query are URL components, not part of the hostname.

How the Public Suffix List changes the answer

The Public Suffix List records suffix rules beneath which registrations occur. It prevents the common “last two labels” mistake and also includes private platform boundaries such as hosted project domains. With private suffix rules enabled, project.github.io can be treated as the registrable site rather than collapsing every project to github.io.

A decision table for common workflows

WorkflowUseDo not lose
Backlink auditRoot domainOccurrence count
Site migrationHostnameApp and regional hosts
Outreach groupingRoot domainSource row
Incident reviewHostnameExact host and timestamp
Domain portfolioRoot domainPublic suffix accuracy

Frequently asked questions

Is www a subdomain?

Yes. It is a conventional subdomain label. FlashDomains can strip it while retaining other meaningful subdomains.

Can a hostname equal the root domain?

Yes. example.com is both a registrable root and a hostname when used directly.

Is a top-level domain the same as a root domain?

No. In example.com, .com is the top-level domain, while example.com is the registered name. Read what a domain name is for the wider naming hierarchy.