🔍

DoH/DoT Test

Test DNS-over-HTTPS and DNS-over-TLS provider connectivity and speed.

GET /v1/doh-test
curl "https://dns.toolkitapi.io/v1/doh-test?domain=github.com"
import httpx

resp = httpx.get(
    "https://dns.toolkitapi.io/v1/doh-test?domain=github.com",
)
print(resp.json())
const resp = await fetch("https://dns.toolkitapi.io/v1/doh-test?domain=github.com", {
});
const data = await resp.json();
console.log(data);
# See curl example
Response 200 OK
{
  "domain": "github.com",
  "doh_providers_tested": 6,
  "dot_providers_tested": 4,
  "doh_working": 5,
  "dot_working": 3,
  "fastest_provider": "Cloudflare",
  "fastest_time_ms": 12.4,
  "results": [
    {"provider": "Cloudflare", "url": "https://cloudflare-dns.com/dns-query", "protocol": "DoH", "success": true, "response_time_ms": 12.4, "records": ["140.82.121.3"], "status_code": 200, "error": null},
    {"provider": "Google", "url": "https://dns.google/dns-query", "protocol": "DoH", "success": true, "response_time_ms": 18.7, "records": ["140.82.121.3"], "status_code": 200, "error": null}
  ],
  "query_time_ms": 847.2
}

Try It Live

Live Demo

Description

Test DNS-over-HTTPS and DNS-over-TLS provider connectivity and speed.

How to Use

1

1. Set the `domain` parameter to any domain you want to resolve via encrypted DNS.

2

2. The API tests all DoH and DoT providers automatically and returns per-provider results.

3

3. Check `fastest_provider` to find the best performing encrypted DNS for your use case.

About This Tool

DoH/DoT Test resolves a domain through 6 DNS-over-HTTPS providers and 4 DNS-over-TLS providers using RFC 8484 wireformat. It measures response times, verifies each provider returns results, and identifies the fastest encrypted DNS option.

Use this to verify encrypted DNS connectivity from your infrastructure, compare provider performance, or confirm that encrypted DNS returns the same results as traditional DNS.

Why Use This Tool

Frequently Asked Questions

Which DoH providers are tested?
Google, Cloudflare, Quad9, OpenDNS, AdGuard, and CleanBrowsing.
Which DoT providers are tested?
Four major DoT providers including Cloudflare (1.1.1.1:853) and Quad9 (9.9.9.9:853).
What protocol does the DoH test use?
RFC 8484 wireformat (application/dns-message), the standard DoH protocol used by browsers and operating systems.

Start using DoH/DoT Test now

Get your free API key and make your first request in under a minute.