URL Domain Calculator
Actual DNS qualified registrable domain using caller independently verified applicable EXACT public suffix records, longest match. No naive last-two-label assumption, PSL wildcard/exception processing, live authority/network request; only actual expanded exact suffixes accepted, unknown host explicit.
Description
A registrable domain consists of a public suffix and the immediately preceding DNS label.
A registrable domain consists of a public suffix and the immediately preceding DNS label.1
Counting only the last two hostname labels fails for suffixes such as co.uk. The calculation and input requirements are explained below.
When to use URL Domain Calculator
Paste an absolute URL and supply a nonempty inventory of distinct, nonblank, lowercase exact ASCII public suffixes.
How to use URL Domain Calculator and how it works
- Prepare the measurements or independently established model inputs described below, with matching units and observation scope.
- Enter the required fields and run URL Domain Calculator.
- Read the result fields using the formula, output units, signs and ordering explained below.
- Correct any rejected inputs and rerun; interpret the result within the stated model and its assumptions.
| Input field | Meaning | Value type | Requirement |
|---|---|---|---|
| actualAbsoluteUrl | Complete absolute URL; parsed without a base. DNS-host branches reject empty and IP-literal hostnames. | string | Required; other constraints below |
| callerVerifiedExactPublicSuffixes | Distinct lowercase exact ASCII suffixes, independently verified and expanded; no wildcard or exception syntax. | array of string | Required; other constraints below |
Paste an absolute URL and supply a nonempty inventory of distinct, nonblank, lowercase exact ASCII public suffixes. Each suffix must consist of valid alphanumeric/hyphen labels; wildcard and exception syntax is rejected. Normalize the hostname through the WHATWG parser, remove one final dot and reject empty or IP-literal hosts. Match only whole-label suffixes and choose the longest match. With no match, or a host equal to the suffix, return empty domain/subdomain text and availability=false. Otherwise the preceding label plus suffix is the registrable domain and the remaining prefix is the subdomain. Suffixes must already be expanded and independently verified; no PSL is installed or downloaded.
suffix=longestWholeLabelMatch; domain=precedingLabel+'.'+suffix; subdomain=remainingPrefix Apply the input ordering, units and branch conditions stated above.
| Output field | Meaning | Value type |
|---|---|---|
| result | Object containing the calculated or selected fields below. | object |
| result.observedQualifiedRegistrableDomain | Observed Qualified Registrable Domain. Interpret its unit, sign, order or availability flag as explained above. | string |
| result.matchedExactPublicSuffix | Matched Exact Public Suffix. Interpret its unit, sign, order or availability flag as explained above. | string |
| result.matchedRegistrableDomainAvailable | Matched Registrable Domain Available. Interpret its unit, sign, order or availability flag as explained above. | boolean |
{
"input": {
"actualAbsoluteUrl": "https://a.b.example.co.uk/path",
"callerVerifiedExactPublicSuffixes": [
"com",
"co.uk"
]
},
"output": {
"result": {
"observedQualifiedRegistrableDomain": "example.co.uk",
"matchedExactPublicSuffix": "co.uk",
"matchedRegistrableDomainAvailable": true
}
}
} Limitations and assumptions
The calculation uses the supplied observations and model inputs. It does not collect measurements, select a reference population or coefficient, or establish that the model applies to the actual case. The stated branch conditions and output units remain part of the result.
All fields require explicit values. Unexpected fields, wrong types, nonfinite numbers and sparse arrays are rejected. Alignment, bounds and supported-token rules are explained above; extremely large inputs or nonfinite results can also fail. Input errors differ from successful false comparisons, unavailable-domain flags and empty match lists.
The runtime uses WHATWG URL parsing; the public-suffix inventory is a separate caller input. No registry or suffix-list authority is obtained by parsing a URL.2
Alternative or Complementary methods
Use URL TLD Calculator for a complementary operation: A URL hostname is made of DNS labels separated by dots.
Use URL Subdomain Calculator for a complementary operation: A subdomain is the hostname prefix above a registrable domain.
References
-
URL Domain Calculator — tool.io
-
WHATWG URL Standard — WHATWG
Similar or alternative tools
- URL TLD Calculator
A URL hostname is made of DNS labels separated by dots.
- URL Subdomain Calculator
A subdomain is the hostname prefix above a registrable domain.