Skip to content
UniKit

URL registrable domain statistics

Extract registrable domains from a URL list with Public Suffix List rules and count them — news.sina.com.cn collapses into sina.com.cn, a.example.co.uk into example.co.uk — entirely in your browser.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

URL list

Only http:// and https:// URLs are accepted; URLs with credentials are rejected and blank lines are ignored.

Registrable domains

One line per domain as "domain + Tab + count"; domains follow the public-suffix rules.

Enter URLs to see statistics

URLs: 0 · Domains: 0 · Suffixes: 0

What this tool does

  • Merge traffic from many subdomains into one site before counting
  • See how many distinct sites a log or link export actually touches
  • Compare the merge result between two suffix interpretations (com.cn vs com)

Example

Input

https://news.sina.com.cn/a
https://sports.sina.com.cn/b
https://a.example.co.uk/c
https://other.test

Output

sina.com.cn	2
example.co.uk	1
other.test	1

news.sina.com.cn and sports.sina.com.cn collapse into sina.com.cn (public suffix com.cn) while a.example.co.uk collapses into example.co.uk (public suffix co.uk).

Frequently asked questions

How big is the built-in public suffix table?

It ships 292 multi-label suffix rules — 7 of them the wildcard and exception forms used in the official list (*.ck, *.bd, *.np, *.kh, *.mm, *.er and !www.ck) — taken from the ICANN section of the Public Suffix List at publicsuffix.org. Suffixes missing from the table fall back to the PSL default rule, where the public suffix is the top-level label alone and the registrable domain is the last two labels.

Why does news.sina.com.cn give sina.com.cn?

Because com.cn is a multi-label public suffix, and a registrable domain takes one more label to its left. The algorithm follows the PSL rules: the longest matching rule wins, and an exception rule (!) removes its leftmost label. A naive "last two labels" implementation would wrongly answer com.cn.

What input is accepted?

One absolute http:// or https:// URL per line; blank lines are ignored. Other protocols (ftp:, data:, …), URLs containing credentials, and plain text all raise invalid-url and stop the run instead of being skipped silently.

How are IP addresses, localhost and ports handled?

IPv4 and IPv6 literals are returned unchanged (for example 192.168.0.1) because IPs have no domain hierarchy, and single-label hosts such as localhost pass through as well. Ports, paths and query strings are ignored and host names are lowercased.

Keywords:public suffix listregistrable domainurl-domian-statistics

Related tools