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

can not get domain if domain with underscore (_) #144

Open
henryhuang2013 opened this issue May 26, 2021 · 1 comment
Open

can not get domain if domain with underscore (_) #144

henryhuang2013 opened this issue May 26, 2021 · 1 comment

Comments

@henryhuang2013
Copy link

e.g. http://wt_nbshentong.cn.b2b168.com/
can not get the domain.

{ hostname: 'wt_njxinjiyuan1.cn.b2b168.com',
isValid: false,
isIp: false,
tldExists: false,
publicSuffix: null,
domain: null,
subdomain: null }

do you know why?

@remusao
Copy link
Collaborator

remusao commented May 26, 2021

Hi @henryhuang2013,

The issue is that unfortunately tld.js is rejecting this hostname as invalid because of the _ (underscore) character it contains. There was some work in the past to add an option to still accept such domains but it was not pursued: #122

Best,

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

2 participants