DNS over HTTPS (Google Public DNS)
by developers.google.com
Data validators
Added on October 31st, 2026
Checked and working on November 15th, 2026
Visit developers.google.com →
What it does
Google Public DNS answers DNS queries over HTTPS with a simple JSON API: request dns.google/resolve?name=example.com&type=MX and get back the records. Look up A, AAAA, MX, TXT, CNAME, NS and other record types, with DNSSEC validation. Handy in browsers and scripts where normal DNS lookups are not possible. Free, no key needed.
At a glance
- API key
- Not needed · More APIs with no key
- Pricing
- Free, no key needed.
- From the browser
- Yes (CORS)
- Formats
- JSON
- Interface
- REST, HTTP-GET
- Provider
- developers.google.com
- Last checked
- Working on November 15th, 2026
More information: https://developers.google.com/speed/public-dns/docs/doh/json
Is this your service? Show that it is listed
Put this badge on your website or in your README; it links to this page. About the badge
Example request
curl
curl 'https://dns.google/resolve?name=example.com&type=A'
JavaScript
const response = await fetch("https://dns.google/resolve?name=example.com&type=A");
const data = await response.json();
console.log(data);
Python
import requests
response = requests.get(
"https://dns.google/resolve?name=example.com&type=A",
timeout=30,
)
print(response.json())
The JavaScript works in a web page as well as in Node.js 18 or newer.