DNS over HTTPS Explained: Encrypting Your DNS Queries

What DNS-over-HTTPS is, why unencrypted DNS is a serious privacy risk in Hong Kong, and step-by-step instructions to enable DoH in Chrome, Firefox, Brave, and Edge.

DNS over HTTPS encryption explained
1How DNS Works

Why Unencrypted DNS Is a Privacy Problem

Every time you visit a website, your device first sends a DNS (Domain Name System) query to translate the domain name — such as google.com — into the IP address your computer needs to connect. By default, this query is sent in plain text over UDP port 53, unencrypted and visible to anyone on the network path between your device and the DNS resolver. In practical terms, this means your ISP can see a complete log of every domain you query, even if the subsequent HTTPS connection to the website is fully encrypted.

In Hong Kong, ISPs are subject to legal obligations that can require them to retain and disclose connection data. Even without active government requests, ISPs routinely sell anonymised browsing data to analytics firms and advertisers. Your DNS query log is effectively a detailed diary of your online interests, health concerns, financial research, and personal communications — all transmitted in plain text with your full IP address attached. This is a significant privacy vulnerability that most users are completely unaware of.

Beyond ISP surveillance, unencrypted DNS is also vulnerable to man-in-the-middle attacks and DNS spoofing. An attacker on the same network as you — a café WiFi network, a hotel connection, or a compromised router — can intercept and manipulate your DNS responses, redirecting you to fake websites that look identical to the legitimate sites you intended to visit. This technique, called DNS cache poisoning, is used in sophisticated phishing campaigns and can be executed without any visible warning signs.

  • ISP logging: Your ISP receives and can log every domain name you query in plain text, creating a complete browsing profile.
  • Network observer access: Anyone on your local network can capture DNS queries using freely available tools like Wireshark.
  • DNS spoofing risk: Unencrypted DNS responses can be manipulated to redirect you to malicious sites.
  • Government data requests: ISP DNS logs are accessible through legal processes and can be shared with authorities.
  • Third-party data sales: Many ISPs sell DNS query data to analytics and advertising companies.
  • No integrity verification: Standard DNS has no mechanism to verify that responses are authentic and unmodified.
Unencrypted DNS privacy risks
2How DoH Works

How DNS over HTTPS Encrypts Your Queries

DNS over HTTPS (DoH), standardised in RFC 8484, solves the plain-text DNS problem by sending DNS queries inside standard HTTPS connections. Instead of sending a plain-text UDP packet on port 53, DoH wraps the query in an encrypted HTTPS request to a DoH resolver on port 443. To any network observer — your ISP, a café router, or a government monitoring system — this traffic appears identical to ordinary web browsing traffic. The domain names you query are completely hidden within the encrypted TLS stream.

DNS over TLS (DoT) is an alternative encryption standard that uses a dedicated TCP connection on port 853. DoT provides similar privacy benefits to DoH but is slightly more distinguishable as DNS traffic because it uses a unique port. Both standards are supported by major resolvers including Cloudflare, Google, and Quad9. For most users, DoH is easier to configure because it works within browsers and standard HTTPS infrastructure — no firewall changes are typically required.

It is important to understand what DoH does and does not protect. DoH prevents your ISP from reading the specific domain names you query. However, your ISP can still see the IP addresses you connect to after the DNS resolution. For comprehensive privacy, DoH should be combined with a VPN, which encrypts all IP-level connection data. DoH also shifts trust from your ISP's DNS resolver to your chosen DoH provider, so selecting a trustworthy provider with an audited no-logs policy — such as Cloudflare 1.1.1.1 — is essential.

  • HTTPS wrapping: DNS queries are sent as encrypted HTTPS requests, indistinguishable from normal web traffic.
  • ISP blind spot: Your ISP can see you connected to a DoH server but cannot read the domain names you queried.
  • TLS authentication: DoH connections are authenticated by TLS certificates, preventing man-in-the-middle manipulation.
  • Port 443: DoH uses the standard HTTPS port, meaning it works through firewalls that block other DNS traffic.
  • DoT alternative: DNS over TLS uses port 853 — similarly private but more identifiable as DNS traffic.
  • Provider trust shift: DoH moves DNS data exposure from your ISP to your chosen resolver — audit your provider's privacy policy.
How DNS over HTTPS works
3Enable in Browsers

How to Enable DNS over HTTPS in Every Major Browser

Enabling DoH in Firefox is straightforward: navigate to Settings, scroll to "Network Settings" at the bottom of the General tab, click "Settings," and check "Enable DNS over HTTPS." Select "Cloudflare" or "NextDNS" from the provider dropdown, or enter a custom DoH resolver URL. Firefox also allows you to set DoH to "Max Protection" mode, which refuses to resolve domains if DoH is unavailable — preventing silent fallback to unencrypted DNS. Firefox has offered DoH since version 73 and has made it increasingly default for US and UK users.

In Chrome and Edge, navigate to Settings > Privacy and security > Security, and enable "Use secure DNS." You can select from Google (8.8.8.8), Cloudflare (1.1.1.1), or enter a custom provider. Chrome's implementation is slightly less strict than Firefox's — it will fall back to unencrypted DNS if DoH is unavailable rather than failing the Difference and the Connection">the connection. Brave, being Chromium-based, has the same DoH configuration path but with Brave's resolver preferences as an additional option. Safari on iOS 14+ and macOS 11+ supports DoH through system-level configuration profiles rather than browser settings.

For the strongest protection, configure DoH at the operating system or router level rather than just in the browser. On Windows 11, DoH can be set in Settings > Network & Internet > Ethernet/WiFi > DNS server assignment. On macOS, system-wide DoH requires a configuration profile or a third-party DNS client like Cloudflare's 1.1.1.1 app. Router-level DoH configuration — available on many modern routers through a firmware setting — protects every device on your network simultaneously, including smart home devices and IoT gadgets that have no browser-based privacy settings.

  • Firefox: Settings > Network Settings > Enable DNS over HTTPS — choose Cloudflare, NextDNS, or custom resolver.
  • Chrome/Edge: Settings > Privacy and security > Security > Use secure DNS — select provider or enter custom URL.
  • Brave: Settings > Privacy and security > Security > Use secure DNS — same path as Chrome with Brave resolver option.
  • Safari: Requires system-level configuration profile on iOS/macOS — use Cloudflare's 1.1.1.1 app for easy setup.
  • Windows 11: Network & Internet > DNS settings supports system-wide DoH with Cloudflare, Google, or Quad9.
  • Router-level: Configure DoH on your router to protect every device on your home network automatically.
Enabling DNS over HTTPS in browsers
4Choosing a Resolver

Choosing the Best DoH Provider for Hong Kong Users

Cloudflare's 1.1.1.1 is the most popular DoH resolver and a strong default choice for Hong Kong users. Cloudflare operates servers in Hong Kong and across the Asia-Pacific region, providing very low query latency — typically under 5 milliseconds from within Hong Kong. Cloudflare's privacy policy for 1.1.1.1 commits to never logging querying IP addresses to disk and never selling DNS data. This policy has been independently audited by KPMG, making it one of the most credible privacy commitments in the DNS space.

Quad9 (9.9.9.9) takes a different approach by adding a security filtering layer — it blocks DNS resolution for domains listed in its threat intelligence database, preventing accidental access to known malware distribution sites, phishing pages, and command-and-control servers. For Hong Kong business users and families who want both privacy and an additional layer of malware protection, Quad9 is an excellent choice. Quad9 is operated by a Swiss non-profit organisation and is not subject to US data retention laws, which may be relevant for users with specific legal jurisdiction concerns.

NextDNS is the most feature-rich option, offering customisable filter lists, detailed analytics about your DNS queries, parental controls, and device-level configuration. NextDNS's free tier allows up to 300,000 monthly queries, which is more than sufficient for most individuals. Paid plans start at approximately HK$38 per month. For power users and privacy enthusiasts who want visibility into their DNS traffic and the ability to customise blocking behaviour, NextDNS provides capabilities that Cloudflare and Quad9 do not match. All three providers support standard DoH and DoT protocols and are fully compatible with all major browsers.

  • Cloudflare 1.1.1.1: Fastest option for HK users with KPMG-audited no-logging policy — best default choice.
  • Quad9 9.9.9.9: Adds malware domain blocking on top of privacy — excellent for businesses and families.
  • NextDNS: Customisable filtering, analytics, and parental controls — best for power users willing to pay a small fee.
  • Google 8.8.8.8: Fast but logs DNS data linked to your account — not recommended for privacy-focused users.
  • Avoid ISP resolvers: Your ISP's DNS server logs every query with your IP address — switch immediately.
  • Test your DoH configuration: Visit 1.1.1.1/help or use dnsleaktest.com to verify DoH is working correctly after setup.
Best DoH providers for Hong Kong

Encrypt Your DNS Queries in 5 Minutes

Enable DNS-over-HTTPS in your browser today — then explore our comparison of the best secure DNS providers for Hong Kong users.

Related VPN Articles