Skip to main content

DNS over HTTPS (DoH)

If you use JSON format, set application/dns-json URL parameter, and if you use DNS wire format, use application/dns-message as either URL parameter of ct or a Content-Type header for POST requests.

Status Codes

  • 400 DNS query not specified or too small.
  • 413 DNS query is larger than maximum allowed DNS message size.
  • 415 Unsupported content type.
  • 504 Resolver timeout while waiting for the query response.

Examples

curl -H 'accept: application/dns-json' 'https://cloudflare-dns.com/dns-query?name=example.com&type=AAAA'

curl 'https://cloudflare-dns.com/dns-query?name=example.com&type=AAAA&application/dns-json'