# DNS over HTTPS (Google Public DNS)

Category: [Data validators](https://free-web-services.com/web-services/web-development/validators/)  
Page: https://free-web-services.com/web-services/web-development/validators/dns-over-https-google-public-dns.html  
Documentation: https://developers.google.com/speed/public-dns/docs/doh/json

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.

- API key: Not needed
- 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

Example request:

```sh
curl 'https://dns.google/resolve?name=example.com&type=A'
```

The JavaScript works in a web page as well as in Node.js 18 or newer.

