How to find out which DNS server you use

There are two answers to “which DNS do I use”. The settings show where your device sends its questions, usually the router. A DNS leak test shows who actually asks the internet for you, usually your ISP or a public DNS. Both take a minute to check.

Updated

On this page

Two answers to one question

Your device sends DNS questions to the server in its network settings. At home that is usually the router itself, 192.168.1.1 or similar. The router doesn't know the answers: it passes the questions on to your ISP's DNS or to the one set in it.

So the settings name the first stop and a leak test names the last one: the resolver that went to the site's own name servers. With a VPN on, both should lead into the tunnel.

Windows

PowerShell
Get-DnsClientServerAddress -AddressFamily IPv4

The servers of each adapter: look at Wi-Fi or Ethernet, and at the VPN adapter while it is connected.

cmd
ipconfig /all

DNS Servers under each adapter.

macOS

Terminal
scutil --dns | grep nameserver

The servers of each resolver; a connected VPN adds its own.

Terminal
networksetup -getdnsservers Wi-Fi

Only servers set by hand. “There aren't any DNS Servers set” means they come from the router.

Linux

Terminal
resolvectl status

Current DNS Server of each link, where systemd-resolved runs (Ubuntu, Fedora and others).

Terminal
cat /etc/resolv.conf

127.0.0.53 there is systemd-resolved itself: the real servers are in resolvectl status.

Android and iPhone

  • Android: Settings → Network & internet → Private DNS (on Samsung: Connections → More connection settings → Private DNS). Off or Automatic means the network's DNS; a host name there, such as dns.google, means that server answers everything over DNS over TLS.
  • The network's own DNS shows in the Wi-Fi network's details under IP settings, if it was set by hand.
  • iPhone and iPad: Settings → Wi-Fi → the (i) next to the network → Configure DNS shows Automatic or the servers set by hand. A DNS profile or a VPN can replace them.

Who actually answers

The DNS leak test on this site makes the browser look up a few random names and shows which resolvers came to our DNS server for them. Your ISP's servers mean your ISP answers. Google, Cloudflare or Quad9 mean a public DNS, chosen by you, the router or the browser.

  • The router passes questions on: the settings show the router, the test shows the ISP.
  • The browser has its own DNS over HTTPS (Chrome, Edge, Firefox): the test shows that provider whatever the system has.
  • A VPN sets its own DNS while connected; after it disconnects, the old one comes back.
  • Public DNS services run many servers: the test may show several addresses of one company.

In Veli

DNS in Veli

By default Veli uses the profile's DNS. In Settings → Security you can turn on ad and threat filtering through DNS (AdGuard, Cloudflare, Quad9) or set your own DNS, including DoH and DoT.

Diagnostics → Privacy shows which DNS servers really answer while the VPN is on.

FAQ

Which DNS should I use?

The one in the VPN profile while the VPN is on. Without a VPN, your ISP's DNS is usually the fastest, and a public DNS such as 1.1.1.1, 8.8.8.8 or 9.9.9.9 helps if the ISP's is slow or hides some names.

I set Cloudflare, so why does the test show Google?

Something else asks in its place: the browser's own DNS over HTTPS, the router or Android's Private DNS. Check them in that order.

Does another DNS hide my traffic?

No. It changes who sees the names of the sites you open. The traffic itself still goes the usual way unless a VPN carries it.

What is 127.0.0.53 in resolv.conf?

The local resolver of systemd-resolved on Linux. It passes questions on to the real servers that resolvectl status shows.

DNS through the tunnel

Veli uses the profile's DNS while connected, lets you set your own with DoH or DoT in Settings → Security, and shows the DNS sites see in Diagnostics → Privacy.