What Is DNS over HTTPS? How It Works and Why You Need It
In this article
DNS over HTTPS (DoH) is a protocol that encrypts your domain name system lookups using the HTTPS standard. The direct answer to whether you should use it is yes, primarily because it prevents your internet service provider (ISP) and local network observers from easily tracking which websites you visit. By wrapping DNS queries in encrypted traffic, DoH protects your privacy and ensures that the address you request is not tampered with by malicious actors on the same network.
Background and Origins
The Domain Name System (DNS) is the phonebook of the internet. When you type "example.com" into your browser, your device asks a DNS server for the numerical IP address associated with that name. Historically, these requests were sent as plain text. This meant that anyone monitoring the network traffic between your computer and the DNS server could see exactly which sites you were visiting.
DNS over HTTPS was developed by Mozilla, Cloudflare, and other tech leaders to solve this visibility problem. It leverages the existing infrastructure of HTTPS, the protocol used for secure web browsing, to tunnel DNS queries. This approach was standardized by the Internet Engineering Task Force (IETF) in RFC 8484. The term "DNS over HTTPS" is the formal, standard technical name for the protocol. It is not slang or informal; it is the precise terminology used in documentation, configuration menus, and technical discussions. In a sentence, you might say: "Enabling DNS over HTTPS in my browser settings blocks my ISP from logging my search history." The origin lies in the growing awareness of digital privacy rights and the need to prevent "DNS spoofing," where attackers redirect users to fake websites.
How It Actually Works
To understand how DoH works, it helps to compare it to traditional DNS. In standard DNS, your device sends a clear-text query to a resolver. An observer can read this query like an open postcard. With DNS over HTTPS, the query is encrypted before it leaves your device. It travels through the same secure channel used for loading web pages.
- Encryption: The DNS query is wrapped in an HTTPS connection, meaning it is encrypted using TLS (Transport Layer Security). Only the DNS resolver you have chosen can decrypt and read the request.
- Tunneling: Instead of using the traditional UDP port 53, DoH uses TCP port 443, the same port used for regular web traffic. This makes it difficult for firewalls to block DNS without blocking all web browsing.
- Resolution: The encrypted packet reaches a compatible DNS resolver (like Cloudflare or Google). The resolver decrypts the request, finds the IP address, and sends the response back through the encrypted channel.
This process ensures that even if someone is sniffing the traffic on your Wi-Fi network, they only see encrypted data destined for a specific resolver. They cannot see that you are trying to access "news-site.com" versus "banking-site.com." The security relies entirely on trusting the specific resolver you configure to handle your queries honestly.
Safety and Privacy Implications
The primary benefit of DNS over HTTPS is enhanced privacy. By default, many ISPs act as your DNS resolver. While they claim this improves speed, they also collect vast amounts of data about your browsing habits. DoH shifts this trust to a third-party provider, such as Cloudflare (1.1.1.1) or Quad9. These providers typically have strict no-logging policies, meaning they do not store your query history.
However, safety is nuanced. DoH does not make you anonymous. Your IP address is still visible to the website you are visiting. Furthermore, if you choose a malicious or poorly configured resolver, that entity could potentially log your data. Therefore, the safety of DoH depends on selecting a reputable provider. It also protects against "man-in-the-middle" attacks where an attacker on the local network tries to redirect your DNS request to a phishing site. Because the connection is encrypted and verified via certificates, your device can detect if the response has been altered.
Comparisons: DoH vs. DoT vs. Standard DNS
While DoH is popular, it is not the only encrypted DNS method. Understanding the differences helps in choosing the right tool.
- Standard DNS: Unencrypted, fast, but exposes your browsing history to anyone on the network path. It is vulnerable to eavesdropping and spoofing.
- DNS over TLS (DoT): Uses a dedicated port (853) for encrypted DNS. It is efficient and secure but can be blocked more easily by restrictive firewalls than DoH, which hides inside normal web traffic.
- DNS over HTTPS (DoH): Hides DNS traffic within standard HTTPS traffic (port 443). This makes it harder to block and provides strong encryption. However, it can sometimes cause compatibility issues with older networks or enterprise firewalls that expect to monitor DNS traffic.
For most home users, DoH offers the best balance of privacy and compatibility. For organizations that need to enforce content filtering, DoT or standard DNS might be preferred because they allow easier monitoring and blocking of specific domains.
How to Choose and Configure
Most modern browsers and operating systems now support DoH natively. You do not always need third-party software. Here is how to enable it on common platforms:
- Mozilla Firefox: Go to Settings > Privacy & Security. Scroll to "Network Settings" and click "Settings." Select "Automatic" or "Custom" and choose a provider like Cloudflare or Google.
- Google Chrome: Go to Settings > Privacy and security > Security. Under "Security," find "Use secure DNS" and toggle it on. You can then select your provider from the dropdown menu.
- Windows 10/11: Open Settings > Network & Internet. Click on "Wi-Fi" or "Ethernet" (depending on your connection). Scroll down to "Hardware properties" and click "DNS server assignment." Switch to "Automatic (dns over https)." Note that Windows allows you to specify a custom provider.
- Android: Go to Settings > Network & Internet > Private DNS. Select "Private DNS provider hostname" and enter the address of your chosen resolver (e.g., one.one.one.one for Cloudflare).
When choosing a provider, consider location for speed and privacy policy for trust. Cloudflare, Google, and Quad9 are widely regarded as reliable options. Always verify that the provider explicitly states they do not sell or log user data.
Common Problems and Troubleshooting
Despite its benefits, DoH can sometimes cause connectivity issues. If you notice websites failing to load after enabling DoH, here are the most likely causes and solutions:
- Network Blocking: Some corporate or school networks block DoH because it bypasses their content filters. If you are on a restricted network, you may need to disable DoH or contact IT support.
- Resolver Outages: Occasionally, a specific DNS provider may experience downtime. If you switch providers and the issue persists, try a different resolver.
- Browser Conflicts: Some extensions or security software may interfere with encrypted DNS. Disable extensions temporarily to test if they are the cause.
If you encounter errors, the simplest fix is often to restart your browser or router. If problems persist, revert to automatic DNS settings to restore full connectivity while you investigate further.
Frequently Asked Questions
Does DNS over HTTPS hide my IP address?
No. DoH only encrypts the lookup process. When you visit a website, your IP address is still visible to that site's server. To hide your IP address, you would need to use a Virtual Private Network (VPN) or the Tor network. DoH complements these tools by adding a layer of privacy to the initial domain resolution step.
Is DNS over HTTPS faster than standard DNS?
Speed varies by provider and location. In many cases, DoH can be faster because major providers like Cloudflare and Google operate massive, optimized global networks. However, the encryption overhead adds a tiny amount of latency. For most users, the difference is negligible, but the reliability of large resolvers often results in better performance than smaller ISP servers.
Can my employer see what I am doing if I use DoH at work?
If your employer manages your device and enforces network policies, they may block DoH or route all traffic through their own proxies. In such environments, your activity may still be monitored. DoH is most effective on personal devices and home networks where you control the settings.
Do I need to install extra software for DNS over HTTPS?
Generally, no. Modern browsers (Chrome, Firefox, Edge) and operating systems (Windows 10/11, macOS, Android, iOS) have built-in support for DoH. You can usually enable it through the settings menu without downloading additional applications. Third-party apps are only necessary if you want to apply DoH to all devices on your network via your router.
Does DNS over HTTPS protect me from malware?
It provides indirect protection. By preventing DNS spoofing, DoH stops attackers from redirecting you to fake login pages or malicious sites via compromised DNS responses. However, it does not scan files for viruses or block malicious downloads. You still need antivirus software and safe browsing practices to stay protected from malware.