Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Detect the registered domains for given hostnames based on Mozillas effective TLD listing

Project description

pyregdom - Python library for Mozilla Public Suffix list

A Python version of usrflo’s regdom libs to detect the registered domain for a given domain name, based on Mozillas effective TLD listing.


From source code:

$ sudo python install

Using pip:

$ pip install pyregdom


>>> import regdom

>>> regdom.get_registered_domain("")

>>> regdom.get_registered_domain("")

>>> regdom.get_registered_domain("")

>>> regdom.get_registered_domain("") # return None

>>> regdom.get_registered_domain("")

>>> regdom.get_registered_domain("", fallback=False) # return None

Update the list

Simply run the script under scripts directory, it will download and parse the latest Mozilla Public Suffix

$ scripts/

Then re-install the module from source.

You can also use your own list file:

$ scripts/ your_own_list_file.dat

The script doesn’t check for the format of the file so make sure you have it in the same format defined at Mozilla Public List.

Author of this module will also update pyregdom on pypi every month if there are changes in the list.

Source code

Source code is hosted at Github, you can get a local copy of the development repository with:

$ git clone

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyregdom, version 0.4.20161109.post5
Filename, size File type Python version Upload date Hashes
Filename, size pyregdom-0.4.20161109.post5.tar.gz (35.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page