askvity

How Does DNS over HTTPS Work?

Published in Network Security 4 mins read

DNS over HTTPS (DoH) works by encrypting Domain Name System (DNS) queries and responses within the HTTPS protocol, which is typically used for secure web browsing. This encryption protects your DNS queries from eavesdropping and manipulation.

Here's a breakdown of the process:

1. Traditional DNS vs. DNS over HTTPS (DoH)

First, it's helpful to understand how traditional DNS works:

  • Traditional DNS: When you type a website address (like example.com) into your browser, your computer sends a DNS query to a DNS server (usually provided by your Internet Service Provider - ISP) to translate that human-readable address into an IP address (like 93.184.216.34). This communication is typically unencrypted.

  • DNS over HTTPS (DoH): With DoH, the DNS query is wrapped in an HTTPS connection. Instead of sending the query directly to a DNS server on port 53 (the standard DNS port), it's sent to a DoH-enabled server over port 443 (the standard HTTPS port).

2. The DoH Process: Step-by-Step

  1. Browser Configuration: You configure your web browser (or operating system) to use a specific DoH-enabled DNS server. Popular DoH providers include Cloudflare, Google Public DNS, and NextDNS.

  2. Initiating a Request: When you type a website address into your browser, the browser recognizes the need to perform a DNS lookup.

  3. Creating the HTTPS Connection: Instead of sending a plain DNS query, the browser establishes an encrypted HTTPS connection to the configured DoH server.

  4. Encapsulating the DNS Query: The DNS query is encapsulated within an HTTPS request. This means the DNS query is now part of an encrypted data stream.

  5. Sending the Request: The browser sends the HTTPS request (containing the DNS query) to the DoH server.

  6. DoH Server Resolution: The DoH server receives the HTTPS request, decrypts it, extracts the DNS query, and performs the DNS lookup on your behalf, just like a traditional DNS server.

  7. Encapsulating the DNS Response: The DoH server receives the DNS response (the IP address) and encapsulates it within an HTTPS response.

  8. Sending the Response: The DoH server sends the encrypted HTTPS response back to your browser.

  9. Receiving and Decrypting: Your browser receives the HTTPS response, decrypts it, and extracts the IP address.

  10. Connecting to the Website: Your browser now has the IP address of the website and can establish a direct connection to the web server.

3. Advantages of DNS over HTTPS

  • Enhanced Privacy: Encrypting DNS queries prevents eavesdropping by ISPs, network administrators, and malicious actors who might otherwise monitor your browsing activity.

  • Improved Security: DoH protects against DNS spoofing and man-in-the-middle attacks, where attackers could redirect you to malicious websites by manipulating DNS responses.

  • Circumventing Censorship: In some regions, governments or ISPs may block access to certain websites by manipulating DNS responses. DoH can help bypass these restrictions by routing DNS queries through trusted, uncensored resolvers.

4. Potential Drawbacks

  • Centralization Concerns: Using a limited number of DoH providers could centralize DNS resolution, giving those providers significant insight into user browsing habits. Choosing trustworthy and privacy-focused providers is important.

  • Performance Overhead: The encryption and decryption process adds a small amount of overhead compared to traditional DNS, potentially leading to slightly slower DNS resolution times. However, modern implementations and faster networks mitigate this concern.

  • Bypassing Network-Level Controls: DoH can bypass network-level content filtering and security policies, which may be a concern for organizations that rely on these controls. Some solutions allow organizations to implement their own DoH servers to maintain control.

In summary, DNS over HTTPS enhances online privacy and security by encrypting DNS queries within the HTTPS protocol, shielding them from interception and manipulation. While there are some potential drawbacks, the benefits generally outweigh the risks for most users.

Related Articles