weppos / publicsuffix-ruby

Domain name parser for Ruby based on the Public Suffix List.
https://simonecarletti.com/code/publicsuffix
MIT License
614 stars 110 forks source link

ERROR: some domains are not allowed according to Registry policy #259

Closed hmfarooq closed 11 months ago

hmfarooq commented 11 months ago

I am working on a list of domains to get subdomains and domains but facing this error for some valid domains. Here is the list for these errors occurring

NHS.UK
CARRD.CO
K12.CA.US
K12.GA.US
K12.FL.US
K12.NC.US
PANTHEONSITE.IO
K12.IN.US
DUCKDNS.ORG
WITHGOOGLE.COM
DIGITALOCEANSPACES.COM
K12.WI.US
VIC.GOV.AU
GLITCH.ME
K12.NJ.US
K12.OR.US
K12.VA.US
K12.MO.US
K12.OH.US
K12.CO.US
K12.AL.US
K12.MN.US
READTHEDOCS.IO
K12.WA.US
K12.MI.US
K12.IA.US
K12.PA.US
SERVICE.GOV.UK
K12.MA.US
DDNS.NET
YOLASITE.COM
K12.SC.US
MY.ID
GOV.PH
PP.RU
K12.NY.US
K12.OK.US
ALTERVISTA.ORG
K12.UT.US
K12.IL.US
NOW.SH
K12.CT.US
K12.AR.US
K12.KY.US
BIR.RU
K12.DE.US
ONTHEWIFI.COM
K12.MS.US
GO.KE
K12.LA.US
BLOGSPOT.CA
WA.GOV.AU
HOMEIP.NET
NSUPDATE.INFO
GOB.EC
RU.NET
K12.TX.US
blogspot.com
web.pk
daa.jp
altervista.org
jp.net
chu.jp
br.com
jpn.com
weppos commented 11 months ago

facing this error for some valid domains

Please define "valid" 🙂

hmfarooq commented 11 months ago

Valid means I can visit "https://br.com" on the browser.

weppos commented 11 months ago

Valid means I can visit "https://br.com" on the browser.

I think there's an expectation misalignment. The list doesn't validate whether the URL can or cannot be used in the browser. You can find more information at https://publicsuffix.org/learn/

Those names, take for example ALTERVISTA.ORG, are not considered valid suffixes because they are listed as private suffixes in the list:

https://github.com/publicsuffix/list/blob/1b3876c5f9fede21447d9725d8671cbfd3abfb7f/public_suffix_list.dat#L11341-L11343

Therefore, the library behaves as expected.

hmfarooq commented 11 months ago

Thanks.