john-kurkowski / tldextract

Accurately separates a URL’s subdomain, domain, and public suffix, using the Public Suffix List (PSL).
BSD 3-Clause "New" or "Revised" License
1.81k stars 211 forks source link

Better document that this project parses Effective TLDs as the suffix #234

Closed pocc closed 2 years ago

pocc commented 2 years ago

Per this question on Stack Overflow, what tldextract calls the "suffix" is actually an "effective TLD" or "eTLD". In gov.uk, gov is a second-level domain and uk is the ccTLD, per wikipedia.

Per Mozilla's documentation on the Public Suffix List, an eTLD is

the highest level at which a domain may be registered for a particular top-level domain

The README should include this term to better describe what it is doing.

john-kurkowski commented 2 years ago

Maybe we could include all 3 terms, to get more coverage? And maybe focus on the term "public suffix"?

Is "effective TLD" an obvious term? I don't mind using it, but I don't want to pin everything on it. My cursory Cmd+F and Google suggest, "effective TLD" is limited to that Mozilla internal wiki, some tldextract-competing packages, and a few StackExchange posts. The term's usage in Mozilla's wiki predates Mozilla's creation of the Public Suffix List. The Public Suffix List's site doesn't use "effective TLD" at all.

pocc commented 2 years ago

Hi John,

I haven't looked at this in months, but I'd say having both would be wise. Looking at the Wikipedia page for the Public Suffix List, Effective TLD is on the first line: https://en.wikipedia.org/wiki/Public_Suffix_List

john-kurkowski commented 2 years ago

Both, cool. Wikipedia's first line also cites Mozilla's wiki.