Re: extracting the root domain from a URL [message #171696 is a reply to message #171667] |
Sun, 16 January 2011 09:29 |
Jonathan Stein
Messages: 43 Registered: September 2010
Karma:
|
Member |
|
|
Den 15-01-2011 00:54, Thomas 'PointedEars' Lahn skrev:
> WHOIS would be overkill here and it is not universally supported anymore
> (for example, DENIC dropped WHOIS support a few years ago except via their
> website because of misuse), so you would get false positives.
We don't need the actual WHOIS data, and I believe that even DENIC
provides simple WHOIS status information.
> The proper internet service to use here is DNS itself, of course.
Depending on how Mike defines "root domain", I don't think you can do
this reliable from DNS.
If you look up www.example.com, and there is no A or AAAA record for
example.com, you'll get www.example.com as the "root domain".
Another approach would be to ask for NS records and define "root domain"
as the highest level with an NS record. This could however include
department.example.com, which might not be what Mike intended...
Regards
Jonathan
|
|
|