get_root_domain1p
Retrieve suffix info from a domain using domain::publicsuffix
Usage
get_root_domain <domainname>
Overview
The get_root_domain utility uses Domain::PublicSuffix to get the root or suffix for a fully qualified domain name. Given a FQDN, this utility will output the "root domain", and the suffix and TLD used to calculate that root domain.
- •
-
Public Info Site:
<http://publicsuffix.org/>
Example usage
$ get_root_domain www.google.com
Domain: www.google.com
Root Domain: google.com
Suffix: com
TLD: com
$ get_root_domain www.google.co.uk
Domain: www.google.co.uk
Root Domain: google.co.uk
Suffix: co.uk
TLD: uk
Return values
Returns 0 if a successful lookup is done, non-zero otherwise.
Releases
6 releases since Debian 8 (Jessie); the text changed 5 times.