node-tld icon indicating copy to clipboard operation
node-tld copied to clipboard

Minor issues

Open vladtreny opened this issue 4 years ago • 5 comments

Hello,

I've found some issues

  1. gov.vc is a website, not tld
  2. ipv6.ye there we get parts: [ 'ipv6', 'ye' ] --- tld_level: 2
  3. gov.ge also the website, not tld

vladtreny avatar Apr 13 '21 15:04 vladtreny

From "The list" https://publicsuffix.org/list/public_suffix_list.dat. gov.vc is declared as a tld. I do not know how to handle thoses cases (where it is both used as a tld AND a domain name) If you suggest me a behavior, i'll gladly implement it

131 avatar Apr 23 '21 13:04 131

From "The list" https://publicsuffix.org/list/public_suffix_list.dat. gov.vc is declared as a tld. I do not know how to handle thoses cases (where it is both used as a tld AND a domain name) If you suggest me a behavior, i'll gladly implement it

Hello, just consider gov.vc as a site and agriculture.gov.vc as a subdomain. Maybe the database above is outdated.

vladtreny avatar Apr 23 '21 17:04 vladtreny

Create an additional layer, where handle such specific cases like gov.vc
Like, first of all, check these cases ['gov.vc', 'gov.ge', etc], then go to the rest in the list public_suffix_list.dat

vladtreny avatar Apr 24 '21 02:04 vladtreny

There are several so-called TLDs in the Public Suffix List that are websites, but there is no rule that a TLD cannot be a website.

The traditional definition says that the TLD is the right-most part of a hostname, basically the string before the first period going from right to left. Based on this, a TLD cannot be a website, but since this rule is not respected by the Public Suffix List, then you have TLDs like gov.uk or gov.ge which are also websites.

@vladtreny sounds like your use case requires a TLD to not be a website. I suggest you handle this in your source code because the change you are requesting would break the expected behaviour of this library given it's based on the Public Suffix List. You can loop a curl or fetch request for all TLDs in the list and see which ones respond and thus handle these ones however you need based on your requirements.

mfpopa avatar Jun 06 '21 07:06 mfpopa

Out of 50m websites, I found only a dozen of such cases. So do not insist to apply these changes.

vladtreny avatar Jun 06 '21 07:06 vladtreny

The allowDotlessTLD will allow this behavior

131 avatar Jul 17 '24 21:07 131