tldextract accurately separates a URL's subdomain, domain, and public suffix, using the Public Suffix List (PSL).
# Create an alias
$ alias tldextract='docker run --rm -u $(id -u):$(id -g) vimagick/tldextract'
# Run it
$ tldextract -j www.google.com