Traditional DNS queries and responses are sent over UDP or TCP without encryption. This is vulnerable to eavesdropping and spoofing (including DNS-based Internet filtering). Responses from recursive resolvers to clients are the most vulnerable to undesired or malicious changes, while communications between recursive resolvers and authoritative nameservers often incorporate additional protection.
To address this problem, Google Public DNS offers DNS resolution over an encrypted HTTPS connection. DNS-over-HTTPS greatly enhances privacy and security between a client and a recursive resolver, and complements DNSSEC to provide end-to-end authenticated DNS lookups.
query(name, type = "1", edns_client_subnet = "0.0.0.0/0")
xn--qxam
").
If an IPv4 string is input, it will be transformed into
a proper format for reverse lookups.255
for an ANY
query.1.2.3.4/24
,
2001:700:300::/48
.
If you are using DNS-over-HTTPS because of privacy concerns, and do
not want any part of your IP address to be sent to authoritative
nameservers for geographic location accuracy, use
edns_client_subnet=0.0.0.0/0
. Google Public DNS normally sends
approximate network information (usually replacing the last part of
your IPv4 address with zeroes). 0.0.0.0/0
is the default.a list
with the query result or NULL
if an error occurred
To perform vectorized queries with only answers (and no metadata) use
bulk_query()
).
query("rud.is")#> $Status #> [1] 0 #> #> $TC #> [1] FALSE #> #> $RD #> [1] TRUE #> #> $RA #> [1] TRUE #> #> $AD #> [1] FALSE #> #> $CD #> [1] FALSE #> #> $Question #> name type #> 1 rud.is. 1 #> #> $Answer #> name type TTL data #> 1 rud.is. 1 3599 104.236.112.222 #> #> $Additional #> list() #> #> $edns_client_subnet #> [1] "0.0.0.0/0" #> #> $Comment #> [1] "Response from dns.mwebdns.eu.(84.246.125.230)" #> #>query("example.com", "255") # ANY query#> $Status #> [1] 0 #> #> $TC #> [1] FALSE #> #> $RD #> [1] TRUE #> #> $RA #> [1] TRUE #> #> $AD #> [1] TRUE #> #> $CD #> [1] FALSE #> #> $Question #> name type #> 1 example.com. 255 #> #> $Answer #> name type TTL #> 1 example.com. 6 3599 #> 2 example.com. 46 21599 #> 3 example.com. 46 21599 #> 4 example.com. 46 3599 #> 5 example.com. 46 59 #> 6 example.com. 46 21599 #> 7 example.com. 46 3599 #> 8 example.com. 46 3599 #> 9 example.com. 46 3599 #> 10 example.com. 47 3599 #> 11 example.com. 2 21599 #> 12 example.com. 2 21599 #> 13 example.com. 28 21599 #> 14 example.com. 1 21599 #> 15 example.com. 16 59 #> 16 example.com. 16 59 #> 17 example.com. 48 3599 #> 18 example.com. 48 3599 #> 19 example.com. 48 3599 #> data #> 1 sns.dns.icann.org. noc.dns.icann.org. 2015082669 7200 3600 1209600 3600 #> 2 a 8 2 86400 1477364031 1475579385 1704 example.com. auGIKxU2oVxE9YE2ca9Xv5yuA2bP8uwIXW3t/d/wxGn6gnzuyVPefMHu5jT0z2ldwsqiB0+VGZpVguUeY7M22PCR0YwMGjB64/VQjsZQxAhaleVOLCRR2fya4EtOYvPRoWielQfDaS+4SBenCv0+nN8Gb3PMSsEe0ICjDSrzFRC0V7U= #> 3 ns 8 2 86400 1477484364 1475701785 1704 example.com. bY3Q/b0KCwv+fkMGpKABu3oT3y+u2xcCoykkPDJrkVGRM16Z4WojbemTYFR++pbsbuVHptz6uUtX3m94kbyvmaLvXTxy1bwY0b8F/0Rz9Se9jy5mIUiatTHftqlz434PC+UnQKNiWZBYsgQJegTJZJLlJ7/KaiIzjrhltRFWwqsOaUA= #> 4 soa 8 2 3600 1477543924 1475701785 1704 example.com. kWe1dnPv94cNlWhysZSKC3WC4/YlSTkG6/NZtFxxQcwPGlS7x+z4tRnNodhfLCpYw8D4loan0ybfWuRK/tzKminJsdt3lLqJxlXvcIzmEkI17xKUpcnD1jA0mhCfTptzLj4oCw4hhkC/d8JuD5jVmTskoiav36SV+cW1KngAY/UtPfw= #> 5 txt 8 2 60 1477325190 1475536185 1704 example.com. ZaMZnuA5mh+GSbmL3nJxDbVZEdAu0BC1I71FgOPojAgRT5i2pn4+obRCd+aUw3c/grt1xzciBdhyw9jMvzcyEwcxk2WDS+REkEwzBn1YKodoo1YCjcXVUZscugSXc+hq+eFaTcRlW/siqWq+cy77VVsjdKJTAJrcK12abkjOnRrqfww= #> 6 aaaa 8 2 86400 1477264070 1475449785 1704 example.com. M0ggDOmzYveQUd145aePLv19PwzYed7bDNsU74quoitB1nEZ8/r7ROdsT1m7VXi/BBimUVtezXBeVTc3/+2rEvhNsmX1WRrHN7seHzAiEt27TNogwn3e40YGCrwVIy+ypLRfZTi+Xlv/Ykd0H4Uvp0tW+69eel8MOlYRqSO5DMizMTc= #> 7 nsec 8 2 3600 1476958241 1475176185 1704 example.com. WnXb1Y/Qkn5CmiRir6a0KssPjiPbEq7Tko0rWsQQyFFPrT+JB/6YUKStJY5K+GN+M2tWGW3jrOSbTVei0GLxjE/3BBLoYtLqLURjEk3Ki3n5zP5c9FMyQPf3fCC0ac/kSxw5V3nTs3eSnu8p/quseV8BqkU/hYgm1qsvQOyXVUSFync= #> 8 dnskey 8 2 3600 1476561735 1474722585 31406 example.com. Oup7snCR/5iUmTuGyHfCfFCisTeqaJ8RHD6aE9wZQR2CCkKZHXO9dzfUL1gA6T35p4T0XeM+TMlv1uZhX157RnanPwyZluancmm5cNz5ub0vG7G/O4DxnSoLmATYoBJ7Ub9Ul4iWFUE7nvyJ23X2MhX6XTiplXYPnztiem6rJLV84JiemoKtvapWchRhFi4w4Y+BdjHfY7IRERjQYNhVuaus5+EeppIoot9srsj2suXePGC7dE0R8z9K/BTYvQi76kBlJzzF9fNNy5JvyZPEUpXATuRD7KfxBsWHaFajOnYOb1eDAL/C0H3hhjVBov2Pexp7YDIsJzIa2g8850LruQ== #> 9 dnskey 8 2 3600 1476561735 1474722585 45620 example.com. f+aO6V+QKA4XgTC0Vqow59jBP/NlX6f7EEbaoXts0lp7Vaj/DBrhnS/sT4BbJb3VK1MvuPmNre5t0eyOeNCjbjrwIM2uf41GFuBI0AFxQx7o2PIdf1vrXsDnUGsZrMkYMv4gr802S7MXsvMdMN5cM0AA5Zol888sLP1yrHIcfNxG8hoUn3dS0L6nd/OxkL70+NjHBTjBQLqkLsK92ryJ0CWrzcJElszBRqfQfYGV/sJ84Ko4tjnBqRuki/rmTW5KQYdE7NI+MvERtGnep7RHb02Luk7BFPPD3uh353EYSAOVHrMH4fte6mJGcj3vxErfSWakRUXQpovLNcqYZNxoGQ== #> 10 www.example.com. A NS SOA TXT AAAA RRSIG NSEC DNSKEY #> 11 a.iana-servers.net. #> 12 b.iana-servers.net. #> 13 2606:2800:220:1:248:1893:25c8:1946 #> 14 93.184.216.34 #> 15 "v=spf1 -all" #> 16 "$Id: example.com 4415 2015-08-24 20:12:23Z davids $" #> 17 256 3 8 AwEAAa3d68DfyIs03nGYpi3a9YX+f/wln3g6dhWWzjUUqp6CGXuaOdEHfS8zI/5JdGKi8Xoc4YmjPGfiCJIkCiQnMKn/QFygpZs41ANLdPp2jJlJhFA6IHE/xxTCxJfNhsdEAOGlMORN9Zu1XLUBo/IuCDUvUzZPgalivd/m9L+Jr4kxbg3v #> 18 257 3 8 AwEAAZ0aqu1rJ6orJynrRfNpPmayJZoAx9Ic2/Rl9VQWLMHyjxxem3VUSoNUIFXERQbj0A9Ogp0zDM9YIccKLRd6LmWiDCt7UJQxVdD+heb5Ec4qlqGmyX9MDabkvX2NvMwsUecbYBq8oXeTT9LRmCUt9KUt/WOi6DKECxoG/bWTykrXyBR8elD+SQY43OAVjlWrVltHxgp4/rhBCvRbmdflunaPIgu27eE2U4myDSLT8a4A0rB5uHG4PkOa9dIRs9y00M2mWf4lyPee7vi5few2dbayHXmieGcaAHrx76NGAABeY393xjlmDNcUkF1gpNWUla4fWZbbaYQzA93mLdrng+M= #> 19 257 3 8 AwEAAbOFAxl+Lkt0UMglZizKEC1AxUu8zlj65KYatR5wBWMrh18TYzK/ig6Y1t5YTWCO68bynorpNu9fqNFALX7bVl9/gybA0v0EhF+dgXmoUfRX7ksMGgBvtfa2/Y9a3klXNLqkTszIQ4PEMVCjtryl19Be9/PkFeC9ITjgMRQsQhmB39eyMYnal+f3bUxKk4fq7cuEU0dbRpue4H/N6jPucXWOwiMAkTJhghqgy+o9FfIp+tR/emKao94/wpVXDcPf5B18j7xz2SvTTxiuqCzCMtsxnikZHcoh1j4g+Y1B8zIMIvrEM+pZGhh/Yuf4RwCBgaYCi9hpiMWVvS4WBzx0/lU= #> #> $Additional #> list() #> #> $edns_client_subnet #> [1] "0.0.0.0/0" #> #> $Comment #> [1] "Response from 199.43.135.53" #> #>query("microsoft.com", "MX")#> $Status #> [1] 0 #> #> $TC #> [1] FALSE #> #> $RD #> [1] TRUE #> #> $RA #> [1] TRUE #> #> $AD #> [1] FALSE #> #> $CD #> [1] FALSE #> #> $Question #> name type #> 1 microsoft.com. 15 #> #> $Answer #> name type TTL data #> 1 microsoft.com. 15 74 10 microsoft-com.mail.protection.outlook.com. #> #> $Additional #> list() #> #> $edns_client_subnet #> [1] "0.0.0.0/0" #> #>query("google-public-dns-a.google.com", "TXT")#> $Status #> [1] 0 #> #> $TC #> [1] FALSE #> #> $RD #> [1] TRUE #> #> $RA #> [1] TRUE #> #> $AD #> [1] FALSE #> #> $CD #> [1] FALSE #> #> $Question #> name type #> 1 google-public-dns-a.google.com. 16 #> #> $Answer #> name type TTL data #> 1 google-public-dns-a.google.com. 16 21599 "http://xkcd.com/1361/" #> #> $Additional #> list() #> #> $edns_client_subnet #> [1] "0.0.0.0/0" #> #> $Comment #> [1] "Response from 216.239.38.10" #> #>query("apple.com")#> $Status #> [1] 0 #> #> $TC #> [1] FALSE #> #> $RD #> [1] TRUE #> #> $RA #> [1] TRUE #> #> $AD #> [1] FALSE #> #> $CD #> [1] FALSE #> #> $Question #> name type #> 1 apple.com. 1 #> #> $Answer #> name type TTL data #> 1 apple.com. 1 1002 17.172.224.47 #> 2 apple.com. 1 1002 17.178.96.59 #> 3 apple.com. 1 1002 17.142.160.59 #> #> $Additional #> list() #> #> $edns_client_subnet #> [1] "0.0.0.0/0" #> #>query("17.142.160.59", "PTR")#> $Status #> [1] 0 #> #> $TC #> [1] FALSE #> #> $RD #> [1] TRUE #> #> $RA #> [1] TRUE #> #> $AD #> [1] FALSE #> #> $CD #> [1] FALSE #> #> $Question #> name type #> 1 59.160.142.17.in-addr.arpa. 12 #> #> $Answer #> name type TTL data #> 1 59.160.142.17.in-addr.arpa. 12 2587 icloud.se. #> 2 59.160.142.17.in-addr.arpa. 12 2587 icloud.es. #> 3 59.160.142.17.in-addr.arpa. 12 2587 icloud.om. #> 4 59.160.142.17.in-addr.arpa. 12 2587 icloudo.com. #> 5 59.160.142.17.in-addr.arpa. 12 2587 icloud.ch. #> 6 59.160.142.17.in-addr.arpa. 12 2587 icloud.fr. #> 7 59.160.142.17.in-addr.arpa. 12 2587 icloude.com. #> 8 59.160.142.17.in-addr.arpa. 12 2587 camelspaceeffect.com. #> 9 59.160.142.17.in-addr.arpa. 12 2587 camelphat.com. #> 10 59.160.142.17.in-addr.arpa. 12 2587 alchemysynth.com. #> 11 59.160.142.17.in-addr.arpa. 12 2587 openni.org. #> 12 59.160.142.17.in-addr.arpa. 12 2587 swell.am. #> 13 59.160.142.17.in-addr.arpa. 12 2587 appleweb.net. #> 14 59.160.142.17.in-addr.arpa. 12 2587 apple.com. #> 15 59.160.142.17.in-addr.arpa. 12 2587 pv-apple-com.apple.com. #> 16 59.160.142.17.in-addr.arpa. 12 2587 ripmixburn.com. #> 17 59.160.142.17.in-addr.arpa. 12 2587 yessql.info. #> 18 59.160.142.17.in-addr.arpa. 12 2587 webobjects.info. #> 19 59.160.142.17.in-addr.arpa. 12 2587 ubnw.info. #> 20 59.160.142.17.in-addr.arpa. 12 2587 skyvines.info. #> 21 59.160.142.17.in-addr.arpa. 12 2587 shopdifferent.info. #> 22 59.160.142.17.in-addr.arpa. 12 2587 sherlock.info. #> 23 59.160.142.17.in-addr.arpa. 12 2587 quicktimetv.info. #> 24 59.160.142.17.in-addr.arpa. 12 2587 quicktimelive.info. #> 25 59.160.142.17.in-addr.arpa. 12 2587 powermac.info. #> 26 59.160.142.17.in-addr.arpa. 12 2587 powerbook.info. #> 27 59.160.142.17.in-addr.arpa. 12 2587 macosx.info. #> 28 59.160.142.17.in-addr.arpa. 12 2587 appleshare.info. #> 29 59.160.142.17.in-addr.arpa. 12 2587 applescript.info. #> 30 59.160.142.17.in-addr.arpa. 12 2587 applepaysupplies.info. #> 31 59.160.142.17.in-addr.arpa. 12 2587 applepaymerchantsupplies.info. #> 32 59.160.142.17.in-addr.arpa. 12 2587 applepay.info. #> 33 59.160.142.17.in-addr.arpa. 12 2587 applemasters.info. #> 34 59.160.142.17.in-addr.arpa. 12 2587 appleexpo.info. #> 35 59.160.142.17.in-addr.arpa. 12 2587 applecomputerinc.info. #> 36 59.160.142.17.in-addr.arpa. 12 2587 applecentre.info. #> 37 59.160.142.17.in-addr.arpa. 12 2587 airtunes.info. #> 38 59.160.142.17.in-addr.arpa. 12 2587 apple.by. #> 39 59.160.142.17.in-addr.arpa. 12 2587 apples-msk.ru. #> #> $Additional #> list() #> #> $edns_client_subnet #> [1] "0.0.0.0/0" #> #>