Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Private suffixes/TLDs? #41

Open
stevenvachon opened this issue Dec 6, 2018 · 2 comments
Open

Private suffixes/TLDs? #41

stevenvachon opened this issue Dec 6, 2018 · 2 comments
Assignees

Comments

@stevenvachon
Copy link

While com is public, pepsi is private and not mentioned in the public list.

@OlliV
Copy link

OlliV commented Jan 14, 2019

What do you think should be the correct behavior? Currently it seems that's parsed correctly as a TLD:

> psl.parse('mycooldomain.pepsi')
{ input: 'mycooldomain.pepsi',
  tld: 'pepsi',
  sld: 'mycooldomain',
  domain: 'mycooldomain.pepsi',
  subdomain: null,
  listed: false }

Note that it returns listed: false.

I have a tangential question, what if the TLD is clearly invalid (at least to me):

> psl.parse('mycooldomain.com--invalid')
{ input: 'mycooldomain.com--invalid',
  tld: 'com--invalid',
  sld: 'mycooldomain',
  domain: 'mycooldomain.com--invalid',
  subdomain: null,
  listed: false }

This returns listed: false too but I'm not sure if this result is meaningful to me as a user.

Compare to this:

> psl.parse('....mycooldomain.com')
{ input: '....mycooldomain.com',
  error:
   { message: 'Domain name label should be at least 1 character long.',
     code: 'LABEL_TOO_SHORT' } }

or even better:

> psl.parse('--mycooldomain.com')
{ input: '--mycooldomain.com',
  error:
   { message: 'Domain name label can not start with a dash.',
     code: 'LABEL_STARTS_WITH_DASH' } }

Now as the left side is clearly invalid the domain is no longer accepted.

There is an expired draft for allowing xn-- in TLD names but I couldn't find if anything similar was ever accepted. draft-liman-tld-names-01. For example RFC 1123 refers that a TLD will be alphabetic, again I couldn't find any supporting evidence that it is clearly standardized to be so.

Therefore I'm not sure if - should be allowed but it looks suspicious to me.

@lupomontero lupomontero self-assigned this Jun 20, 2019
@lupomontero
Copy link
Owner

Remated to #23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants