Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

Public Domain-Suffix Extraction Library for Ruby

By Peter Cooper / June 10, 2010

The Public Suffix List is a cross-vendor initiative to provide an accurate list of domain name suffixes. [..] It is available for use in any software, but was originally created to meet the needs of browser manufacturers.

A “public suffix” is one under which Internet users can directly register names. Some examples of public suffixes are “.com”, “” and “”. The Public Suffix List is a list of all known public suffixes.

Simone Carletti

Simone's library public_suffix_service makes it easy to parse any domain name into its TLD, unique domain name, and subdomain portions, following the myriad of rules regarding all of the different TLDs that currently exist.


  1. dubek says:

    There's also this one, I don't know if there's any difference:

Other Posts to Enjoy

Twitter Mentions