Skip to contents

Querying

Extract public suffixes and registrable domains from hostname strings.

public_suffix()
Public suffix of a host
registrable_domain()
Registrable domain of a host
is_public_suffix()
Is a host itself a public suffix?
suffix_extract()
Split hosts into subdomain, registrant label, and public suffix
public_suffix_rule()
Inspect the prevailing PSL rule for each host

PSL Metadata

Inspect the active Public Suffix List snapshot.

psl_version()
Identity of the active Public Suffix List
psl_rules()
Rules of the active Public Suffix List

List Management

Refresh or switch the active PSL source. The bundled snapshot is used by default; these functions let you update it or point to a local file.

psl_refresh()
Refresh the cached Public Suffix List from upstream
psl_use()
Choose the active Public Suffix List for this session