DNS over HTTPS vs a VPN: who sees what
DNS over HTTPS hides your lookups from the network on the path; a VPN moves the whole path. See who sees what in four setups, from one packet capture.
Key takeaways
- DNS over HTTPS encrypts the lookup only. The address you connect to, and usually the site name, stay visible to your ISP.
- A VPN carries the lookups and the connections together, so the network on your side sees one tunnel to one exit server.
- In our run with both on, 0 plain DNS packets left the physical adapter; Firefox's DoH session ran inside the tunnel.
- With the tunnel up and browser DoH off, the 38 lookup packets travelled on the tunnel adapter, and the physical one carried none.
On this page (6)
- Who can see my DNS queries with plain DNS, DoH, a VPN, and both?
- What does a packet capture show with DoH and a VPN on and off?
- Which resolver answers when both are on?
- What does DNS over HTTPS not hide?
- When is DNS over HTTPS alone enough, and when do you add a VPN?
- How can I check which path my lookups take?
DNS over HTTPS (DoH) is not a VPN. DoH hides your name lookups from the network between you and one resolver; a VPN carries all of your traffic, lookups included, to an exit server.
Think of a DNS resolver as the server that turns a name such as example.org into an address. Every site you open starts with a question to one. That question is what both tools change, in different ways.
Who can see my DNS queries with plain DNS, DoH, a VPN, and both?
With plain DNS, anyone on the path can read the lookup. With DoH, only the resolver you named can. With a VPN, the lookup travels inside the tunnel and the resolver at the exit's end answers. With both, the DoH provider answers and the network on your side sees only the tunnel.
RFC 8484 defines DoH: the lookup goes as an HTTPS request, so it looks like other web traffic on port 443. Plain DNS uses port 53 and is readable by whoever carries it.
| What is visible | Plain DNS | DoH only | VPN only | DoH and VPN |
|---|---|---|---|---|
| The lookup (the name you ask for) | Your network, and the resolver it handed out | The DoH provider only | The resolver at the exit's end (with the DNS setting on its default), and the VPN operator's side of the tunnel | The DoH provider, reached through the tunnel |
| The address you then connect to | Your network | Your network | Only the exit server's side | Only the exit server's side |
| The site name in the TLS handshake (SNI) | Your network | Your network | Only the exit server's side | Only the exit server's side |
| Page content over HTTPS | Not readable | Not readable | Not readable | Not readable |
| The address sites see your traffic come from | Your own address | Your own address | The exit server's address | The exit server's address |
If you pick a DNS operator in the VPN app instead of the default, that operator answers the lookup, reached through the tunnel, and it sees the names. Read it by column. The two DoH-only cells that stay "your network" are the point of the next sections. Encrypting the lookup does not remove the connection that follows it.
What does a packet capture show with DoH and a VPN on and off?
We captured packets on a Linux desktop in four states, counting only protocol, port and interface. Plain DNS appeared on the physical adapter only with the tunnel down and DoH off. With the tunnel up, the physical adapter carried no plain DNS at all.
How this was tested
- Product
- ForestVPN Linux desktop client, published .deb
- Version
- the published package, installed 2026-10-29
- System
- Ubuntu 26.04 LTS, systemd-resolved, one network adapter, home-lab VM
- Checked
- Runs
- 1
Not tested
One run on 2026-10-29 from a lab VM on the Free plan, no account sign-in. Firefox 158.0.1, headless, a fresh profile for each of 3 page loads of one neutral page per state. DoH off was network.trr.mode 5; DoH on was mode 3 (DoH only) with Mozilla's published Cloudflare endpoint.
tcpdump -nn counted packets per window by adapter, direction, protocol and port; no payload and no address was kept. Counts include the VM's background traffic in that window and are not throughput. The DNS setting stayed on its default, ForestVPN server ("dns automatic"). Tunnel up means the connection verdict was Working (code net.working), which the app shows as "Protected". The lab line already exits in Germany, so a location proves nothing; we judged by adapter.
Not tested: Chrome secure DNS, Android Private DNS (DNS over TLS, port 853), Windows, macOS, a router, Firefox's own default for your region, and destination addresses or handshake fields, which we did not extract.
| State | Adapter carrying the lookups | Protocol and port | Packets | Plain DNS on the physical adapter |
|---|---|---|---|---|
| Tunnel down, DoH off | Physical | DNS, port 53 | 38 | 38 |
| Tunnel down, DoH on | Physical | HTTPS, port 443, to the DoH provider | 273 | 0 |
| Tunnel up, DoH off | Tunnel | DNS, port 53 | 38 | 0 |
| Tunnel up, DoH on | Tunnel | HTTPS, port 443, to the DoH provider | 248 | 0 |
Two things stand out:
- DoH changes the size of the lookup traffic. 273 and 248 packets against 38, because every lookup becomes an HTTPS exchange with a handshake and framing.
- The tunnel changes the adapter. In the two tunnel-up states the physical adapter carried only UDP on non-DNS ports, which is how the tunnel's own packets look from outside, plus some control packets.
Which resolver answers when both are on?
The DoH provider answers. With the tunnel up and Firefox set to DoH only, the browser's lookups were HTTPS to the provider's address, carried on the tunnel adapter, and 4 plain DNS packets passed to and from the tunnel's own resolver, the lookup of the provider's host name.
That last detail is worth knowing. A browser needs an address for the DoH provider before it can use it.
With no fixed bootstrap address, that first question goes to the system resolver. In our run it went through the tunnel. In the tunnel-down DoH state we saw one plain DNS pair on the physical adapter in the idle window before the page loads; we did not tie it to a name.
So the VPN does not override browser DoH. It changes the road the HTTPS request travels. Firefox documents that its default differs by version and region. Chrome turns secure DNS on in automatic mode and falls back to an unencrypted lookup if the provider fails. Check the setting in the browser you use.
With DoH off and the tunnel up, the system resolver on the tunnel link answered: 38 plain DNS packets on the tunnel adapter, 0 on the physical one. The physical link kept its own resolver configured, unused for those lookups.
What does DNS over HTTPS not hide?
DoH hides the lookup and nothing after it. Once your device has the address, it connects to it, and your network sees that destination address, its timing and the size of what flows.
The site name usually leaks a second time. In a TLS handshake the browser tells the server which site it wants in a field called the Server Name Indication (SNI), sent in the clear. Encrypted Client Hello (ECH) masks the SNI.
It needs the site and the browser to support it, and the browser learns the key through DNS HTTPS records. Cloudflare's page notes that a network's resolver can drop the ECH settings from those records, and browsers then connect without ECH.
A VPN hides all three from your ISP and the network on your side, and moves them to the VPN exit's side. It does not remove them: the exit server sees destination addresses, and the DoH provider, if you chose one, still sees every name. Trust moves; it does not disappear. See what a VPN does for the longer version.
- DoH only: the resolver you picked sees the names; your network sees the addresses.
- VPN only: the exit's side sees names and addresses; your network sees one tunnel.
- Both: your chosen DoH provider sees the names, and the exit's side sees the addresses.
When is DNS over HTTPS alone enough, and when do you add a VPN?
DoH alone is enough when the thing you want to keep from the network is the lookup, and you accept that it still sees where you connect. A shared café network reading your name lookups is the plain case; the connection address stays visible, so it is a partial answer.
Add a VPN when the addresses and timing matter too, or when you want one setting for every app. Browser DoH covers that browser. A tunnel covers every app on the device, including those with no secure DNS setting, unless you use split tunnelling (by app on Android, by IP range on Windows and Linux): excluded apps stay outside it.
On Android, Private DNS is the system-wide analogue, using DNS over TLS (RFC 7858) on port 853; see Always-on VPN, battery and Private DNS. We did not test it.
If you want filtering, choose a filtering DNS provider. ForestVPN's DNS setting lists named operators and sends your lookups to the one you pick through the tunnel; the filtering is that operator's, and it sees your names.
How can I check which path my lookups take?
Count packets by port on each adapter, before and after the change. You need a Linux or macOS machine, a terminal and a browser.
- Start a capture on all interfaces with
tcpdump -i any -nn -q 'port 53', piped toawk '{print $2}' | sort | uniq -cor justwc -l, so you keep a count per interface and no addresses. - Load one neutral page three times with the VPN off. Count packets on port 53 per interface.
- Turn on your browser's secure DNS and repeat. Port 53 should drop to a bootstrap lookup or none, and port 443 traffic to the provider should rise.
- Connect the VPN, wait until the app shows "Protected", and repeat both. You should see no port 53 and no DoH-provider traffic on the physical interface.
- Run a resolver test too. A DNS leak test page lists the resolvers it saw; read each row by asking who chose it.
If the tunnel will not come up, start with VPN connected but no internet. For the IPv6 side of the same question, see IPv6 leaks. ForestVPN also needs no email: your sign-in is a number.
Questions and answers
Is DNS over HTTPS the same as a VPN?
No. DNS over HTTPS wraps only the name lookup in HTTPS, so one resolver answers privately. A VPN encrypts all traffic between your device and the VPN's exit server.
Does a VPN make DNS over HTTPS unnecessary?
Not as a rule. With a VPN on, the lookups already travel inside the tunnel, so browser DoH changes who answers them, not who on your network sees them. Keep it if you want that provider.
Can I use DoH and a VPN at the same time?
Yes. In our Linux run Firefox with DoH on kept asking its DoH provider over HTTPS, and the requests were carried by the tunnel. The provider then sees your names, as you chose.
What does DNS over HTTPS not hide?
It does not hide the destination address you connect to, the packet sizes and timing, or, unless the site and browser use Encrypted Client Hello, the site name sent in the TLS handshake.
When is DoH alone enough?
When your concern is the resolver on your own network reading the lookups, and you accept that the network still sees where you connect. Public Wi-Fi is the usual example.
Sources
- RFC 8484: DNS Queries over HTTPS (DoH) (read October 29, 2026)
- RFC 7858: DNS over Transport Layer Security (TLS) (read October 29, 2026)
- Google Chrome Help: Use a secure connection to look up a site's IP address (read October 29, 2026)
- Mozilla Support: Firefox DNS over HTTPS (read October 29, 2026)
- Cloudflare Docs: Encrypted Client Hello (ECH) (read October 29, 2026)
- RFC 9460: Service Binding and Parameter Specification via the DNS (SVCB and HTTPS RRs) (read October 29, 2026)
How this was made
Drafted with AI assistance from the cited standards and vendor help pages and our own capture of the published Linux client on 2026-10-29, then checked by automated gates and an editor.
