/
DNS Magnitude

DNS Magnitude

Description:


Measure how popular a domain name is.
Credits to Alex Mayrhofer from nic.at

This is how we for now have implemented DNS Magnitude at SWITCH.

Some details: link



Impala Query:


Total number of resolvers over the past week:

select count(distinct src) as n from dns.queries
where server in ('a.nic.ch','b.nic.ch') and
( (year = 2017 and month = 9 and day = 19) or (year = 2017 and month = 9 and day = 18) or (year = 2017 and month = 9 and day = 17) or (year = 2017 and month = 9 and day = 16) or (year = 2017 and month = 9 and day = 15) or (year = 2017 and month = 9 and day = 14) or (year = 2017 and month = 9 and day = 13) )

Resolvers per domain over the past week:

select domainname, count(distinct src) as n from dns.queries
where server in ('a.nic.ch','b.nic.ch') and rcode != 3 and
( (year = 2017 and month = 9 and day = 19) or (year = 2017 and month = 9 and day = 18) or (year = 2017 and month = 9 and day = 17) or (year = 2017 and month = 9 and day = 16) or (year = 2017 and month = 9 and day = 15) or (year = 2017 and month = 9 and day = 14) or (year = 2017 and month = 9 and day = 13) )
group by domainname order by n desc

Resolvers per 'web domain' over the past week:

select domainname, count(distinct src) as n from dns.queries
where server in ('a.nic.ch','b.nic.ch') and rcode != 3 and (qtype = 1 or qtype = 28) and (domainname = qname or qname like 'www.%') and
( (year = 2017 and month = 9 and day = 19) or (year = 2017 and month = 9 and day = 18) or (year = 2017 and month = 9 and day = 17) or (year = 2017 and month = 9 and day = 16) or (year = 2017 and month = 9 and day = 15) or (year = 2017 and month = 9 and day = 14) or (year = 2017 and month = 9 and day = 13) )
group by domainname order by n desc




Example Output:


For the second query:

domainname,n
switch.ch,475369
comlaude.ch,390814
infomaniak.ch,313551
nine.ch,284753
bluewin.ch,266028
noris.ch,265760
google.ch,255436
hostpoint.ch,226000
honcode.ch,219717

Scores from DNS-Magnitude:

switch.ch,9.11712352069361
comlaude.ch,8.980518783264063
infomaniak.ch,8.826888903912902
nine.ch,8.759695439350402
bluewin.ch,8.712253637933138
noris.ch,8.711550651103522
google.ch,8.683915959419839
hostpoint.ch,8.598520813687763
honcode.ch,8.578856104856875

Related content

Unique Domain Names queried per Day
Unique Domain Names queried per Day
More like this
Popular labels
Popular labels
More like this
Popular labels alternative version
Popular labels alternative version
More like this
Queries per day that include the EDNS0 option edns-key-tag
Queries per day that include the EDNS0 option edns-key-tag
More like this
Count Google Open DNS Queries
Count Google Open DNS Queries
More like this
Number of unique clients over a month
Number of unique clients over a month
More like this