On 28 Feb 2019, at 11:53, Mike Marynowski wrote:

There are many ways to determine what the root domain is. One way is analyzing the DNS response from the query to realize it's actually a root domain, or you can just grab the ICANN TLD list and use that to make a determination.

What I'm probably going to do now that I'm building this as a cached DNS service is just walk up the subdomains until I hit the root domain and if any of them have a website then it's fine.

This is more complicated than it seems. I have the t-shirt to prove it.

I suggest you look at the Mozilla Public Suffix List at https://publicsuffix.org/ — it was created for different purposes, but I believe it maps well enough to my understanding of your use case. You'll be able to pad the gaps using a custom list.

Best regards

-lem

Reply via email to