# Top-Level Domain (TLD)

Key: `technology.internet.top_level_domain`

Domain extension (e.g., .com, .org, .uk). May include second-level domains for country codes (e.g., .co.uk). Does not include the dot.

Page: <https://meridian.online/docs/finetype/types/technology/internet/top_level_domain>

Samples: `com`, `org`, `uk`, `co.uk`, `xn--3e0b707e`

## Use it

Shell

```shell
finetype infer -i 'com' --mode column
# → technology.internet.top_level_domain
```

DuckDB

```sql
SELECT ft_infer('com');
-- → 'technology.internet.top_level_domain'
```

Cast template: {col} is your column

```sql
CAST({col} AS VARCHAR)
```

## Background

### Origin

A top-level domain is one of the domains at the highest level of the Domain Name System, directly below the root.[[1]](https://en.wikipedia.org/wiki/Top-level_domain) In a full domain name the top-level domain is the last non-empty label, so in www.example.com it is com.[[1]](https://en.wikipedia.org/wiki/Top-level_domain)

RFC 920, Domain Requirements, was written by J. Postel and J. Reynolds and published in October 1984.[[2]](https://www.rfc-editor.org/rfc/rfc920.html) RFC 920 introduced the limited set of top level domains.[[2]](https://www.rfc-editor.org/rfc/rfc920.html) RFC 920 lists the initial top level domain names as ARPA, GOV, EDU, COM, MIL and ORG, alongside country domains.[[2]](https://www.rfc-editor.org/rfc/rfc920.html) RFC 920 explains that general categories such as government, education or commercial were chosen to provide an organization name that is free of undesirable semantics.[[2]](https://www.rfc-editor.org/rfc/rfc920.html) RFC 920 defines a country domain as the English two letter code identifying a country according to the ISO standard Codes for the Representation of Names of Countries.[[2]](https://www.rfc-editor.org/rfc/rfc920.html) When RFC 920 was published, no country domains had yet been established.[[2]](https://www.rfc-editor.org/rfc/rfc920.html)

RFC 1591, Domain Name System Structure and Delegation, was written by J. Postel and published in March 1994.[[3]](https://www.rfc-editor.org/rfc/rfc1591.html) RFC 1591 names the generic top-level domains of the time as EDU, COM, NET, ORG, GOV, MIL and INT.[[3]](https://www.rfc-editor.org/rfc/rfc1591.html) RFC 1591 states that the IANA is not in the business of deciding what is and what is not a country.[[3]](https://www.rfc-editor.org/rfc/rfc1591.html) Country codes are generally the two-letter ISO 3166 codes, though there are exceptions such as .uk.[[1]](https://en.wikipedia.org/wiki/Top-level_domain)

ICANN's New gTLD Program opened its first application round in 2012, and the first new gTLDs from that round were delegated to the root zone in October 2013.[[1]](https://en.wikipedia.org/wiki/Top-level_domain) Since 2009, countries with non-Latin scripts may apply for internationalized country code top-level domains, which use a Punycode-translated ASCII name in the Domain Name System.[[1]](https://en.wikipedia.org/wiki/Top-level_domain)

### Use

IANA's registry of top-level domains lists each one with its type, such as generic or country code, and the organisation that manages it.[[4]](https://www.iana.org/domains/root/db) IANA records .uk as a country-code top-level domain managed by Nominet UK.[[5]](https://www.iana.org/domains/root/db/uk.html)

RFC 920 describes top level domains as subdivided into second level domains, which may be subdivided into third level domains.[[2]](https://www.rfc-editor.org/rfc/rfc920.html)

RFC 5890 defines the ACE prefix xn-- as a string that appears at the beginning of every A-label, the ASCII-compatible form of an internationalised label.[[6]](https://www.rfc-editor.org/rfc/rfc5890.html) IANA records xn--3e0b707e as the A-label of .한국, a country-code top-level domain for South Korea managed by KISA.[[7]](https://www.iana.org/domains/root/db/xn--3e0b707e.html) The same internationalised TLD can reach you as its xn-- A-label or in its native script, so convert one to the other before comparing values. (Meridian's view)

RFC 4343 clarifies that Domain Name System names are case insensitive.[[8]](https://www.rfc-editor.org/rfc/rfc4343.html)

## Sources

1. [Top-level domain - Wikipedia](https://en.wikipedia.org/wiki/Top-level_domain) — secondary source
2. [RFC 920: Domain Requirements](https://www.rfc-editor.org/rfc/rfc920.html) — standard
3. [RFC 1591: Domain Name System Structure and Delegation](https://www.rfc-editor.org/rfc/rfc1591.html) — standard
4. [Top-Level Domains](https://www.iana.org/domains/root/db) — organisation
5. [.uk Top-Level Domain](https://www.iana.org/domains/root/db/uk.html) — organisation
6. [RFC 5890: Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework](https://www.rfc-editor.org/rfc/rfc5890.html) — standard
7. [.한국 Top-Level Domain](https://www.iana.org/domains/root/db/xn--3e0b707e.html) — organisation
8. [RFC 4343: Domain Name System (DNS) Case Insensitivity Clarification](https://www.rfc-editor.org/rfc/rfc4343.html) — standard

## How it's detected

Pattern allows IDN (xn--) format.
