Skip to content
All findings

Public Suffix List libraries vs the live list (2026-11-30): psl 1.15.0, publicsuffix2 and tldextract's offline snapshot return bank.in, gov.cz, api.br as the registrable domain

Published 30 Nov 2026

I scored 9 PSL libraries on 10,054 rules of public_suffix_list.dat 2026-11-30. psl 1.15.0 (46M/wk, last release 2024-12) gets 105 ICANN and 858 private rules wrong: www.sbi.bank.in -> bank.in. publicsuffix2 (2019 data) gets 317 ICANN rules wrong. tldextract 5.4.0 is current when it can fetch, but offline it falls back silently to a 2025-04-07 snapshot (86 wrong). tldts and tldextract skip PRIVATE by default: alice.github.io -> github.io. Current: tldts, publicsuffixlist, parse-domain.

"Get the registrable domain (eTLD+1)" is only as good as the Public Suffix List copy a library carries. On 2026-12-01 three widely used libraries returned a public suffix as the "domain" for rules added in 2025. In each case every site under the suffix comes out as one site: psl 1.15.0 (npm, ~46.5M downloads/week, last release 2024-12-02), publicsuffix2 (PyPI, ~4.9M/month, data from 2019), and tldextract 5.4.0 when it can't reach the network (bundled snapshot 2025-04-07). Up to date: tldts 7.6.4, publicsuffixlist 1.1.2.20261130, parse-domain 8.4.2, and tldextract when it can fetch.

log
psl.get: 2/6 ok | wrong: www.sbi.bank.in -> bank.in; www.mvcr.gov.cz -> gov.cz; shop.example.api.br -> api.br; myenv.me-central-1.elasticbeanstalk.com -> me-central-1.elasticbeanstalk.compublicsuffix2 get_sld: 1/6 ok | wrong: www.sbi.bank.in -> bank.in; www.mvcr.gov.cz -> gov.cz; shop.example.api.br -> api.br; ...; myapp.vercel.app -> vercel.apptldextract offline snapshot(2025-04-07) private=True: 2/6 ok | wrong: www.sbi.bank.in -> bank.in; www.mvcr.gov.cz -> gov.cz; ...

(repro/minimal_js.log, repro/minimal_py.log.) bank.in / fin.in were added to the PSL on 2025-11-07 (India's domain for regulated banks), gov.cz on 2025-08-14, and api.br on 2025-08-26.

Method

  • Reference: public_suffix_list.dat downloaded 2026-12-01, VERSION: 2026-11-30_18-44-25_UTC, 10,513 rules (6,953 ICANN, 3,560 PRIVATE). I computed the expected eTLD+1 with the publicsuffix.org algorithm and checked that code against the official tests/test_psl.txt (73/73 pass).
  • One test host per rule, e.g. www.zztest.<rule>, with * replaced by a label, and www.<rule> for ! exceptions. That gives 10,054 ASCII hosts (459 IDN rules skipped). Every library got the same hostnames (tld-extract needs a URL, so I prefixed http://).

Results: rules where the library's eTLD+1 differs from the current list

| library (bundled list) | ICANN rules wrong (of 6,507) | PRIVATE rules wrong (of 3,547), private on | |---|---|---| | publicsuffix2 2.20191221 get_sld (2019-12) | 317 | 2,360 | | tld-extract 2.1.0 (npm, published 2022-12) | 251 | 1,778 (allowPrivateTLD) | | psl 1.15.0 psl.get (published 2024-12-02) | 105 | 858 | | tldextract 5.4.0, offline snapshot (2025-04-07) | 86 | 798 | | tldjs 2.3.2 (published 2025-07-11) | 41 | 729 | | tld 0.13.2 get_fld (snapshot 2026-03-06) | 28 | 413 | | parse-domain 8.4.2 | 3 | 100 | | tldextract 5.4.0, default (fetches live list) | 0 | 0 (include_psl_private_domains=True) | | tldts 7.6.4 getDomain(h, {allowPrivateDomains:true}) | 0 | 1 | | publicsuffixlist 1.1.2.20261130 privatesuffix | 0 | 1 |

The single miss for tldts and publicsuffixlist is threadedstack.dev, which was added to the PSL 9 hours before my download. Most of the private misses for the stale libraries are cloud-hosting suffixes: new AWS regions under *.rds.amazonaws.com, elasticbeanstalk.com, on.aws, amazonlightsail.com, and so on.

tldextract: live list online, silent 2025 snapshot offline

tldextract 5.4.0 downloads the live list on first use and caches it in ~/.cache/python-tldextract. In a container started with --network none (repro/04_tldextract_offline.log) it logs two WARNING tldextract: Exception reading Public Suffix List url ... tracebacks and then quietly uses its bundled snapshot:

log
### with network (fresh cache)first call 0.28s -> ExtractResult(subdomain='www', domain='zztest', suffix='api.br', is_private=False) | top_domain_under_public_suffix = zztest.api.br### docker --network none (fresh cache)first call 0.02s -> ExtractResult(subdomain='www.zztest', domain='api', suffix='br', is_private=False) | top_domain_under_public_suffix = api.br

The same code gives different answers depending on whether the sandbox, CI job or air-gapped server had network access the first time. To pin the behaviour, ship a list file and fail loudly instead of falling back: TLDExtract(suffix_list_urls=["file:///path/public_suffix_list.dat"], fallback_to_snapshot=False) works with --network none (repro/05_tldextract_file_url.log). Or warm the cache at build time.

Default that bites: PRIVATE section off

This one is documented, not stale data. tldextract (include_psl_private_domains=False) and tldts (allowPrivateDomains: false) ignore the PRIVATE section by default. Browsers use the full list for cookies and "same site". With the defaults:

log
tldextract default: ... alice.github.io -> github.io; myapp.vercel.app -> vercel.app; myenv.me-central-1.elasticbeanstalk.com -> elasticbeanstalk.comtldts.getDomain default: (same three)

If you group, rate-limit or allow-list by "registrable domain", every GitHub Pages or Vercel site counts as one tenant. Turn the private section on (include_psl_private_domains=True, {allowPrivateDomains: true}). publicsuffixlist (only_icann=False), tld (search_private=True) and psl already include it by default.

What to do

  • Node: use tldts with allowPrivateDomains: true rather than psl. psl hasn't released since 2024-12.
  • Python: use publicsuffixlist (re-released with each list update) or tldextract with a pinned or fetched list. Drop publicsuffix2.
  • To check any library, use a host under a recent rule: www.sbi.bank.in should give sbi.bank.in.

Reproduce

repro/minimal.py and repro/minimal.js (pinned install lines at the top) check 6 hosts against hard-coded expected values. The full run is 01_reference.py (reference + official tests) → 02_py.py / 02_node.js → 03_score.py, plus 04_tldextract_offline.py. Logs are next to each script.

Sources

  • Public Suffix List: https://publicsuffix.org/list/public_suffix_list.dat, tests: https://github.com/publicsuffix/list/blob/main/tests/test_psl.txt
  • bank.in / fin.in addition, PR #2652: https://github.com/publicsuffix/list/pull/2652
  • psl releases: https://github.com/lupomontero/psl/releases
  • tldextract private domains option: https://github.com/john-kurkowski/tldextract (README: "How to treat private domains as suffixes")