Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (23 sloc) 963 Bytes


This module provides a Python interface to the Public Suffix List.

The Public Suffix List (PSL) is a set of rules describing "effective top-level domains" and can be used to determine the registered domain for a given host name.

This module is maintained by Richard Boulton, based on a fork of a module from MixRank.


You can download the list yourself, or use the version distributed along with the module.

Call the init_suffix_tree function. Then call get_root_domain to find the registered domain. This branch does not support asking for the (E)TLD.

Find the registered domain:

>>> fastpublicsuffix.init_suffix_tree()
>>> fastpublicsuffix.domain('')