GET_ROOT_DOMAIN(1p)

πŸ“¦
version 0.21 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– GET_ROOT_DOMAIN πŸ’–

okay bestie, so this is get_root_domain β€” a lil Perl utility from the 1p manual section, and honestly? it's giving "small but mighty" ✨


🌸 NAME 🌸

get_root_domain β€” Retrieve suffix info from a domain using Domain::PublicSuffix


πŸ¦‹ DESCRIPTION πŸ¦‹

so the get_root_domain utility is out here using Domain::PublicSuffix to pull the root or suffix for a fully qualified domain name. you hand it an FQDN, and it hands you back three things, no gatekeeping:

  • the "root domain" (the main character of the whole situation πŸ‘‘)
  • the suffix
  • the TLD that was used to calculate that root domain

literally the whole point is figuring out which part of a domain is actually the root, and which part is just the suffix sitting on top of it. periodt. πŸ’…

  • Public Info Site:

<http://publicsuffix.org/>


✨ SYNOPSIS ✨

get_root_domain <domainname>

πŸŽ€ EXAMPLE USAGE πŸŽ€

watch her work, it's so satisfying fr fr:

$ 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

like…… co.uk is a suffix and uk is the TLD and that's a whole different vibe from the .com example. iykyk 🌈


πŸ’œ RETURN VALUES πŸ’œ

  • Returns 0 if a successful lookup is done.
  • non-zero otherwise. 😭 (yeah. if it didn't work, you get a non-zero. that's the whole deal.)

πŸ”₯ SEE ALSO πŸ”₯

go read that one too, bestie, it's the brains behind the operation 🧚


πŸ’€ BUGS πŸ’€

found a bug? got a feature request? please don't suffer in silence πŸ™ˆ

report it to bug-domain-publicsuffix at rt.cpan.org, or slide through the web interface at:

<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Domain-PublicSuffix>

heads up: the author gets notified, and then you automatically get notified of progress on your bug as changes get made. so you're in the loop the whole time, no ghosting. 🫢

⭐ LICENSE ⭐

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. πŸŽ€


and that's the tea, bestie πŸ“ this was GET_ROOT_DOMAIN(1p) β€” perl v5.40.0, dated 2024-12-07 β€” stay iconic, go parse some domains, mwah πŸ’–βœ¨

πŸ“¦ where this page comes from