Your AI Queries Are Leaking Through DNS: How to Set Up Encrypted DNS (Step-by-Step)
Last updated: 2026-07-16
The Short Answer
You've locked down your AI stack — a local model here, Perplexity for research there, maybe a VPN for the rest. But if you haven't specifically configured encrypted DNS, your ISP, your employer's network team, or anyone else positioned on your network path can still see the domain of every AI service you query, in plain text, every single time — regardless of how much encryption sits on top of that connection.
This isn't a gap in HTTPS. It's a gap HTTPS was never designed to close. DNS-over-HTTPS (DoH) and DNS-over-TLS (DoT) fix it, and setting either up correctly takes about fifteen minutes. Here's exactly what's leaking, why it matters specifically for AI usage, and how to close it at the browser, OS, and router level.
What DNS Actually Leaks (And Why HTTPS Doesn't Help)
Every time you visit chatgpt.com, perplexity.ai, or any AI tool's domain, your device has to translate that hostname into an IP address before it can connect. That translation — the DNS lookup — happens before your HTTPS connection is established, and on most default configurations, it happens in plain text over UDP port 53.
This means that even on a fully HTTPS-encrypted connection, anyone watching the network — your ISP, a corporate firewall, a public Wi-Fi operator, a nation-state intercept point — can see exactly which domains you resolved, in order, with timestamps. They can't see the contents of your prompt to Claude or your Perplexity search terms. But they don't need to. The domain alone tells a story: chatgpt.com at 11pm, perplexity.ai repeatedly around a specific news event, a legal-AI research tool right before a job change, a mental-health AI service at odd hours. Domain-level metadata is frequently more revealing than people assume, precisely because it requires no decryption to collect.
A VPN doesn't automatically fix this either. Most VPN clients tunnel your traffic but leave your system's default DNS resolver in place unless the client explicitly overrides it — a misconfiguration known as a "DNS leak," and it's common enough that dedicated leak-test sites exist just to check for it. If you've ever set up a VPN and never specifically verified your DNS provider changed with it, there's a real chance your AI queries are still resolving through your ISP's default resolver, VPN active or not. See our breakdown of why a VPN alone doesn't protect your AI privacy for the other gaps this same misconception causes.
DoH vs. DoT vs. Plain DNS: What's the Difference
Three things happen when your device looks up a domain:
Plain DNS (the default on most systems) sends the query unencrypted over UDP port 53. Anyone on the network path can read it and, in many cases, tamper with the response.
DNS-over-TLS (DoT) wraps the same query in a TLS-encrypted tunnel over a dedicated port (853). It's encrypted, but it uses a distinct port, which means a network operator can still identify that DoT traffic is happening (though not its contents) and block the port entirely if they choose to.
DNS-over-HTTPS (DoH) wraps DNS queries inside standard HTTPS traffic on port 443 — the same port as all other web traffic. This is the harder one to distinguish or block, since it's indistinguishable at the port level from any other HTTPS request, and it's what most browsers and major resolvers have standardized on.
For most people, DoH is the more practical choice: broader support, harder to selectively block, and configurable in places DoT often isn't (like browser-level settings that don't touch the rest of the OS).
Setting Up DNS-over-HTTPS: Browser Level
This is the fastest option and covers the browser you actually use for AI tools, without touching system-wide settings.
Firefox:
- Settings → Privacy & Security → scroll to "DNS over HTTPS"
- Set to "Max Protection" or "Increased Protection"
- Choose a provider from the dropdown, or select "Custom" and enter a resolver URL
Chrome / Edge / Brave:
- Settings → Privacy and security → Security
- Enable "Use secure DNS"
- Select "With" and choose a provider, or enter a custom DoH endpoint
Recommended resolvers to enter (pick one, not the ISP-default option in the dropdown):
https://dns.quad9.net/dns-query— Quad9, no query logging, blocks known-malicious domainshttps://one.one.one.one/dns-query— Cloudflare 1.1.1.1, independently audited no-log policy- Your VPN provider's built-in resolver, if it offers one (see below)
Setting Up Encrypted DNS: Operating System Level
Browser-level DoH only protects browser traffic. Anything else on your machine — a desktop AI client, a background sync tool, a terminal-based API call to an LLM provider — still uses your system resolver unless you configure it there too.
Windows 11:
- Settings → Network & Internet → your active connection → Edit DNS server assignment
- Set to "Manual," enter a DoH-capable resolver (e.g.,
1.1.1.1/1.0.0.1for Cloudflare) - Toggle "DNS over HTTPS" to "On (automatic template)" for that entry
macOS:
- System Settings → Network → your active connection → Details → DNS
- Add the resolver IP addresses manually
- macOS doesn't expose a native DoH toggle in System Settings — for full DoH enforcement, a small local resolver client (like Cloudflare's
cloudflaredrunning as a local proxy) gives you OS-wide DoH without relying on browser-only settings
Linux (systemd-resolved):
```bash
sudo nano /etc/systemd/resolved.conf
```
Add:
```
DNS=1.1.1.1#cloudflare-dns.com
DNSOverTLS=yes
```
Then restart: sudo systemctl restart systemd-resolved
Setting Up Encrypted DNS: Router Level
If you want every device on your home network protected without configuring each one individually — laptops, phones, a tablet you occasionally run an AI app on — set it at the router. Router-level DNS is one piece of a broader setup; our guide to network privacy and firewall tools covers the rest of what's worth locking down on the same network.
- Log into your router's admin panel (usually
192.168.1.1or192.168.0.1) - Find the DNS settings, typically under WAN or Internet settings
- Replace the ISP-assigned DNS servers with
1.1.1.1and1.0.0.1(Cloudflare) or9.9.9.9(Quad9) - If your router firmware explicitly supports DoH or DoT (check under advanced/DNS settings — DD-WRT, OpenWrt, and some newer stock firmware do), enable it there directly
Router-level DNS doesn't encrypt the router-to-resolver hop by itself unless the router firmware specifically supports DoH/DoT — check your firmware's documentation. Without that support, you're still improving on an ISP-default resolver's logging practices, just not closing the encryption gap entirely. That's a real improvement, but it's not the same guarantee as device-level DoH.
Affiliate Disclosure: This article may contain affiliate links. If you make a purchase through these links, we may earn a small commission at no extra cost to you. We only recommend products we genuinely believe in. This helps support our work and allows us to continue providing free content.
The Easier Path: Let Your VPN Handle It
Manually configuring DoH across a browser, an OS, and a router is the thorough approach, but it's also three separate places to get right and three separate places a future OS update or browser reset can quietly revert. The simpler fix for most people is routing everything through a VPN that handles encrypted DNS automatically, so there's one setting to verify instead of three — see our comparison of VPNs for AI privacy if Proton VPN isn't the right fit for your setup.
Proton VPN routes all DNS queries through its own encrypted resolvers by default whenever the VPN is active — you don't configure DoH separately, because the tunnel itself prevents your ISP from ever seeing the DNS request in the first place. Proton's no-logs policy has been independently audited rather than just claimed, which matters here specifically: a DNS resolver that promises not to log is only as good as whoever can verify that promise. For anyone doing sensitive AI research — competitive analysis, security research, health or legal questions run through Perplexity or an LLM — that closes the exact gap this article is about, in one toggle, without needing to separately harden a browser, an OS, and a router.
Affiliate Disclosure: This article may contain affiliate links. If you make a purchase through these links, we may earn a small commission at no extra cost to you. We only recommend products we genuinely believe in. This helps support our work and allows us to continue providing free content.
Why This Matters Specifically for AI Tool Usage
DNS privacy isn't a new concern, but it's a sharper one now than it was five years ago, for one specific reason: the domains people query have gotten a lot more revealing. A DNS log of google.com lookups tells you almost nothing. A DNS log showing repeated connections to an AI legal-research tool, a competitor-analysis AI product, or a specific vertical AI assistant tells a much more specific story about what someone is working on, researching, or worried about — often before a single prompt has been typed.
If part of your privacy stack already includes routing sensitive research through Perplexity Pro instead of a search engine tied to your logged-in Google account, DNS encryption is the piece that keeps that choice from being undone at the network layer. Perplexity's cited, session-based search reduces what's tied to your identity within the query itself — but if the DNS lookup for perplexity.ai is still visible to your ISP or employer's network monitoring in plain text, the "which AI tool, how often, at what times" metadata is available regardless of how private the query content is. Closing the DNS gap is what makes the rest of the stack actually hold together as one system instead of a set of disconnected precautions.
Affiliate Disclosure: This article may contain affiliate links. If you make a purchase through these links, we may earn a small commission at no extra cost to you. We only recommend products we genuinely believe in. This helps support our work and allows us to continue providing free content.
Quick Reference Checklist
- Confirm whether your browser has DoH enabled (Settings → Privacy & Security, or Privacy and security → Security)
- Set a no-log resolver explicitly (Quad9 or Cloudflare) rather than leaving the ISP default
- Configure DNS at the OS level too — browser-only DoH doesn't cover desktop apps or terminal traffic
- Test for DNS leaks after any VPN setup, since default configurations frequently leave the system resolver unchanged
- Set router-level DNS for whole-network coverage, and check whether your firmware supports DoH/DoT natively
- If you'd rather manage one setting than three, use a VPN with encrypted DNS built in and verify it's active
- Re-check after major OS updates — DNS settings are a common casualty of update-triggered resets
None of this requires special technical skill — the steps above are all settings-menu or five-line-config changes. The part that actually matters is doing all three layers (browser, OS, router) rather than just the browser, since that's the layer most privacy guides stop at and the one most likely to leave a real gap. DNS is only one leak point — if you want to verify what else is actually leaving your machine, see our guide to auditing any AI tool's network traffic.
Stay Ahead of the Next Gap
Privacy stacks fail one unchecked layer at a time — a VPN with DNS still leaking, a browser setting that reset after an update, a resolver that logs more than it claims. We track the gaps that actually matter for people using AI tools day to day.
Get the PrivateAI weekly digest — practical privacy tooling and configuration gaps you need to know about, delivered every Tuesday.
Close the Gaps in Your Privacy Stack
One email per week. Network privacy, tool defaults, and configuration gaps that actually matter.