
Every time someone visits a website, their device needs to identify the IP address associated with its domain name. This process is handled by the Domain Name System (DNS), which translates readable website addresses into numerical network addresses.
Traditional DNS queries are generally sent without encryption. This means that other parties who can observe the network traffic may be able to see which domains a user is trying to access.
DNS over HTTPS (DoH) is a technology that sends DNS queries through encrypted HTTPS connections. It helps protect DNS requests from being easily observed or modified while they travel across a network.
DoH is increasingly relevant to browser security, network privacy, cloud infrastructure and modern internet communication.
This guide explains how DNS over HTTPS works, its architecture, benefits, limitations, implementation methods, tools and practical applications.
DNS over HTTPS is a protocol that sends DNS queries and responses through HTTPS connections.
Traditional DNS commonly uses UDP port 53, although TCP and other DNS transport methods are also supported. These traditional DNS exchanges are not inherently encrypted.
DoH encapsulates DNS messages within HTTPS communication, normally using HTTP/2 or HTTP/3. The encrypted connection protects the DNS exchange while it travels between the client and the DoH resolver.
For example, when a user enters a website address into a browser:
The browser identifies the domain name.
It sends a DNS query to a configured DoH resolver.
The query travels through an encrypted HTTPS connection.
The resolver processes the DNS request.
The resolver returns the DNS response through the same protected connection.
The browser uses the returned IP address to connect to the website.
The main purpose of DoH is to improve the privacy and integrity of DNS communication over the network.
DNS is an essential part of internet communication, but traditional DNS traffic can expose information about domain lookups.
DoH addresses some of these privacy and security concerns.
Traditional DNS queries may be visible to network observers. DoH encrypts the communication between the client and the DoH resolver.
This makes it more difficult for someone monitoring the network to read the DNS requests directly.
Unencrypted DNS communication can be vulnerable to certain forms of interception and manipulation.
HTTPS provides authentication and encryption for communication with the configured resolver, helping protect DNS exchanges against network-level interference.
Public Wi-Fi networks may expose users to network monitoring and other security risks.
DoH can help prevent nearby network observers from directly reading DNS queries transmitted between a device and its resolver.
Modern browsers can support DoH to improve DNS privacy without requiring users to manually change every application.
Encrypting DNS communication makes some forms of DNS interception more difficult. However, DoH does not prevent every DNS-related attack, such as malicious domain registration, compromised websites or malware.
DoH follows a request-and-response process using an encrypted HTTPS connection.
A user enters a website address, such as example.com, into a browser.
The browser needs to obtain the corresponding DNS records before establishing the connection to the destination server.
The browser or operating system creates a DNS query containing the domain name and the requested record type.
Common DNS record types include:
A: IPv4 address
AAAA: IPv6 address
MX: Mail exchange information
CNAME: Canonical name
TXT: Text information
NS: Name server information
The DNS message is transmitted to a configured DoH resolver using HTTPS.
The connection is protected using TLS encryption.
DoH commonly uses HTTP/2 or HTTP/3 and supports defined DNS message formats.
The DoH resolver receives the request and performs DNS resolution.
It may answer from its cache or obtain the required information through the DNS resolution process.
The resolver sends the response through the encrypted HTTPS connection.
The response contains the requested DNS information, such as an IP address.
The browser uses the returned address to establish a connection with the destination server.
The DNS lookup is complete, and the browser can continue loading the website.
A typical DoH architecture contains several important components.
The client is the browser, operating system or application that needs to resolve a domain name.
It creates DNS queries and communicates with the configured DoH resolver.
The DoH client converts DNS requests into HTTP-based communication.
It handles the HTTPS connection, sends the query and processes the returned DNS message.
The HTTPS connection protects communication between the DoH client and resolver.
TLS provides encryption and server authentication when certificate validation is performed correctly.
The resolver receives DNS queries and returns DNS responses.
It may maintain a DNS cache and communicate with other DNS infrastructure to obtain information.
When the answer is not available in its cache, a recursive resolver may contact authoritative DNS infrastructure through the DNS resolution process.
The resolver then returns the resulting information to the client.
After receiving the DNS response, the client connects to the destination website using the resolved IP address.
DoH supports two primary methods for sending DNS messages over HTTP.
The HTTP GET method places the encoded DNS query in the request URL.
A simplified request looks like this:
GET /dns-query?dns=BASE64URL_DATA HTTP/2
Host: resolver.example
Accept: application/dns-message
The DNS query is encoded using Base64URL representation.
GET requests can be useful when working with HTTP caching and systems that support URL-based requests.
However, the encoded query may appear in URL-related logs, so the resolver and infrastructure must handle logging and privacy carefully.
The HTTP POST method sends the DNS message in the request body.
Example:
POST /dns-query HTTP/2
Host: resolver.example
Content-Type: application/dns-message
Accept: application/dns-message
[Binary DNS Message]
POST is useful when sending DNS messages directly in the request body.
Both methods use HTTPS, and the standard DNS wire format is represented using the application/dns-message media type.
Traditional DNS and DNS over HTTPS perform the same fundamental job: resolving domain names into DNS records.
Their main difference is the communication method.
Traditional DNS:
Commonly uses UDP port 53.
Can also use TCP port 53.
Does not inherently encrypt DNS messages.
Can expose domain lookup information to network observers.
DNS over HTTPS:
Uses HTTPS communication.
Commonly operates over TCP port 443 with HTTP/2 or over QUIC-based HTTP/3.
Encrypts DNS queries and responses in transit.
Makes DNS traffic harder to distinguish from other HTTPS traffic through basic network inspection.
DoH changes how DNS communication is transported, not the fundamental DNS record system.
DNS over HTTPS and DNS over TLS are both designed to protect DNS communication through encryption.
However, they use different transport protocols.
DNS over TLS sends DNS messages through a dedicated TLS connection.
It commonly uses TCP port 853.
DoT provides encrypted DNS communication without placing DNS messages inside HTTP requests.
DoH sends DNS messages through HTTPS communication.
It commonly uses port 443, which is also used by many ordinary web services.
This allows DoH traffic to operate through standard HTTPS infrastructure.
DoT uses a dedicated DNS-over-TLS transport.
DoH uses HTTP-based communication protected by TLS.
DoT commonly uses port 853.
DoH commonly uses port 443.
Both protect DNS queries and responses in transit.
Both require trust in the selected resolver.
Neither protocol automatically guarantees complete internet privacy.
Understanding the following concepts helps developers and network engineers work with DoH.
A recursive resolver processes DNS requests and obtains answers for clients.
It may use cached records or query other DNS servers to find the required information.
A DNS cache stores previously obtained DNS records for reuse.
Caching reduces repeated resolution work and can improve response time.
Cached records are generally governed by their time-to-live (TTL) values.
TTL specifies how long a DNS record may be cached.
For example, a record with a TTL of 300 seconds has a five-minute TTL.
Actual caching behaviour also depends on resolver and client policies.
DNS Security Extensions provide mechanisms for verifying the authenticity and integrity of DNS data through cryptographic signatures.
DNSSEC and DoH solve different problems.
DoH encrypts communication between a client and its resolver, while DNSSEC helps validate DNS data through the DNS resolution chain.
They can be used together.
DoH uses HTTPS, so the client must validate the resolver's TLS certificate.
Certificate validation helps confirm that the client is communicating with the intended resolver rather than an impersonating server.
A DoH client needs to know which resolver to use.
The resolver may be configured manually, provided by the operating system or selected through browser settings.
The resolver choice matters because it determines which service receives the DNS queries.
DoH improves DNS transport security, but it should not be confused with a complete privacy solution.
Encrypted DNS Communication: DNS queries and responses are protected while travelling between the client and resolver.
Reduced Local Network Visibility: Local network operators and other network observers generally cannot directly read DNS messages protected by DoH.
Protection Against Certain Interference: Encryption and TLS authentication make some forms of DNS interception and manipulation more difficult.
Secure Browser Integration: Browser-level DoH can protect DNS queries generated by supported browser features.
Resolver Visibility: The configured resolver can still see the DNS queries it processes.
Website Tracking: DoH does not prevent websites from tracking visitors through cookies, scripts, browser fingerprinting or other techniques.
IP Address Visibility: The destination IP address may still be visible to network observers.
Malware: Malicious software may bypass the configured DoH service or use its own DNS resolution mechanism.
Phishing: DoH does not automatically identify or block fraudulent websites.
Traffic Analysis: Network observers may still infer information from connection metadata, timing and traffic patterns.
Resolver Trust: A resolver may collect, process or retain DNS query information according to its own policies.
DoH should therefore be considered one layer of network privacy rather than a replacement for all security controls.
DoH can be enabled through supported browsers, operating systems or network configurations.
The exact steps depend on the device and software version.
Some modern browsers provide secure DNS settings.
A typical configuration process involves:
Opening browser settings.
Finding the privacy or security section.
Locating the secure DNS option.
Selecting a supported resolver or entering a custom provider.
Saving the configuration.
The browser may use its own DoH configuration instead of relying on the operating system's DNS settings.
Some operating systems support encrypted DNS configurations.
Where available, administrators can configure a supported DoH server through system network settings or management policies.
This may allow multiple applications to use the configured DNS service, depending on the operating system and application behaviour.
Some routers and network environments can direct supported devices towards an encrypted DNS service.
However, simply configuring a router's normal DNS server address does not automatically mean that client-to-router DNS traffic uses DoH.
The network architecture must explicitly support the encrypted DNS protocol.
Several organisations provide public DNS resolvers that support DoH.
Cloudflare provides a public DNS resolver with DNS over HTTPS support.
It is used by browsers, applications and devices that support encrypted DNS configuration.
Google Public DNS supports DNS over HTTPS and offers resolver services for users and developers.
Quad9 provides public DNS services with security-focused filtering options and supports encrypted DNS protocols.
Its filtering behaviour depends on the resolver endpoint selected.
Firefox supports secure DNS functionality through configurable DNS-over-HTTPS settings.
Users can select supported providers or use available configuration options.
Several Chromium-based browsers provide secure DNS functionality.
The exact configuration and available providers depend on the browser and its policies.
DNS proxy applications can provide encrypted DNS forwarding between local devices and remote resolvers.
They can be useful in managed environments where administrators need more control over DNS configuration.
Developers can experiment with DoH through JavaScript using a supported resolver endpoint.
The following example uses a JSON-based DNS API to request an A record.
async function resolveDomain(domain) {
const endpoint =
"https://cloudflare-dns.com/dns-query";
const url = new URL(endpoint);
url.searchParams.set("name", domain);
url.searchParams.set("type", "A");
const response = await fetch(url, {
headers: {
Accept: "application/dns-json"
}
});
if (!response.ok) {
throw new Error(
`DNS request failed: ${response.status}`
);
}
const data = await response.json();
return data.Answer || [];
}
resolveDomain("example.com")
.then(records => {
console.log(records);
})
.catch(error => {
console.error(error);
});
This example uses a resolver's JSON API over HTTPS. It demonstrates encrypted DNS resolution but is not the standard binary application/dns-message DoH wire format.
In production applications, developers should also consider provider policies, browser restrictions, error handling, caching, request limits and the privacy implications of sending domain queries to an external resolver.
Practical projects can help developers understand encrypted DNS communication.
Build a web application where users enter a domain name and retrieve DNS records.
Possible features include:
Domain input
A and AAAA record lookup
MX and TXT record lookup
Response display
Error handling
Query history stored locally
Build a small application that sends DNS queries to multiple supported resolvers.
Compare response times and returned DNS records.
The project should explain that network conditions, caching and geographic location can influence the results.
Create a dashboard that displays DNS queries generated by a controlled test application.
Include timestamps, requested domains, record types and response status.
Avoid collecting or exposing other users' private DNS activity without proper authorisation.
Build a diagnostic application that checks whether a test environment is configured to use an expected encrypted DNS resolver.
The tool can display resolver information, connectivity status and basic configuration results.
Create a tool that retrieves and displays different DNS record types through a supported DoH service.
Add search, filtering and structured result presentation.
DoH is useful in environments where DNS privacy and secure network communication are important.
Browsers can use DoH to encrypt DNS queries generated while users visit websites.
Encrypted DNS can help reduce the visibility of domain lookup information to other parties observing public Wi-Fi traffic.
Organisations may use encrypted DNS as part of their network privacy and security architecture.
However, they must consider DNS monitoring, filtering, access control and internal domain resolution requirements.
Applications and supported mobile environments can use encrypted DNS services to protect DNS communication.
The implementation depends on the operating system, application networking stack and resolver configuration.
Cloud-based applications and infrastructure may use DoH for specific DNS resolution requirements, particularly when encrypted communication with a remote resolver is needed.
Privacy-oriented browsers and applications may offer DoH as one of several features designed to limit unnecessary exposure of user activity.
Despite its privacy benefits, DoH introduces several technical and operational challenges.
If many users rely on a small number of public resolvers, DNS query information may become concentrated among those providers.
This can create privacy and operational concerns.
Traditional network security tools may inspect DNS traffic using familiar DNS protocols and ports.
DoH encrypts DNS communication within HTTPS, which can make DNS-specific monitoring more difficult.
Some networks use DNS filtering to enforce access policies.
If applications bypass the network's configured resolver by using their own DoH provider, existing filtering rules may not work as expected.
If a DoH resolver becomes unavailable or the HTTPS connection fails, DNS resolution may be interrupted.
Applications need appropriate error handling and resolver configuration.
DoH requires HTTPS communication, which involves connection and encryption overhead.
However, connection reuse, caching and modern HTTP protocols can reduce the impact.
Actual performance depends on resolver location, network conditions and implementation.
Different DNS providers may have different data retention and logging practices.
Users and administrators should evaluate the policies of the resolver they choose.
The following practices can help improve the security and reliability of DoH deployments:
Use trusted DNS resolver providers.
Validate TLS certificates correctly.
Understand the resolver's privacy and data-retention policies.
Configure fallback behaviour carefully.
Monitor resolver availability.
Avoid sending sensitive DNS queries to untrusted services.
Use DNSSEC validation where appropriate.
Maintain enterprise DNS filtering and monitoring requirements.
Test compatibility with internal domains and network services.
Keep browsers and operating systems updated.
Do not assume DoH prevents all tracking or malicious activity.
Document the resolver configuration used by applications and devices.
Developers and network professionals should understand several technical areas.
DNS fundamentals and record types
HTTP and HTTPS communication
TLS encryption and certificate validation
TCP and UDP networking
HTTP/2 and HTTP/3 fundamentals
JavaScript or Python programming
Browser networking tools
DNS resolver architecture
Network troubleshooting
Basic cybersecurity concepts
DNSSEC fundamentals
A strong understanding of traditional DNS makes learning DoH much easier.
DNS over HTTPS is a specialised networking technology that can be useful in several technical career paths.
Network Engineer: Works with DNS infrastructure, network connectivity and encrypted communication.
Cybersecurity Engineer: Implements and evaluates network security controls, encrypted DNS and threat protection.
Backend Developer: Integrates DNS services into applications and builds network-related tools.
Cloud Engineer: Manages cloud networking, DNS resolution and infrastructure services.
Security Operations Analyst: Monitors network activity and investigates DNS-related security events.
Network Security Architect: Designs secure DNS infrastructure and policies for enterprise environments.
These roles generally require broader networking, security or software engineering knowledge in addition to DoH.
Beginners can follow a structured learning process.
Step 1: Learn DNS Fundamentals
Understand domain names, recursive resolvers, authoritative name servers, DNS records and TTL.
Step 2: Understand HTTP and HTTPS
Learn HTTP requests, response headers, TLS encryption and certificate validation.
Step 3: Study Traditional DNS Security
Understand common DNS risks and the purpose of DNSSEC.
Step 4: Learn DoH Architecture
Study how DNS messages are transmitted through HTTPS using GET and POST requests.
Step 5: Experiment with a Public Resolver
Use a supported DoH service to retrieve DNS records for test domains.
Step 6: Build a Small Project
Create a DNS lookup tool using JavaScript or Python.
Step 7: Explore Network Monitoring
Learn how encrypted DNS affects network visibility, filtering and security monitoring.
For additional technology learning resources, explore EasyShiksha online courses and search available courses.
DNS over HTTPS is an important development in modern internet communication. It protects DNS queries and responses by sending them through encrypted HTTPS connections.
By reducing the visibility of DNS requests to network observers, DoH can improve privacy and help protect DNS communication from certain forms of interception and manipulation.
However, it does not make users completely anonymous or prevent every type of cyberattack. Resolver trust, DNS filtering, monitoring and privacy policies remain important considerations.
Understanding DoH, traditional DNS, DNSSEC and HTTPS provides developers and network professionals with useful knowledge for building and managing more secure internet-connected systems.
DNS over HTTPS is a protocol that sends DNS queries and responses through encrypted HTTPS connections. It helps protect domain lookup information from being directly read by network observers.
DoH is used to improve DNS privacy and protect communication between clients and DNS resolvers. It also helps reduce certain forms of DNS interception and manipulation.
A client creates a DNS query and sends it through an HTTPS connection to a configured resolver. The resolver processes the request and returns the DNS response through the encrypted connection.
DoH commonly uses HTTPS over TCP port 443 with HTTP/2 or HTTP/3 over QUIC. It uses the standard HTTPS transport rather than the dedicated port commonly associated with DNS over TLS.
Traditional DNS commonly uses UDP or TCP port 53 without inherent encryption. DoH sends DNS messages through HTTPS, protecting the communication with TLS encryption.
DoH sends DNS messages through HTTP-based communication protected by TLS, usually over port 443. DoT uses a dedicated TLS connection for DNS, commonly over port 853.
DoH can hide DNS queries from direct observation by many network intermediaries, but it does not completely hide browsing activity. Websites, DNS resolvers and other network components may still obtain certain information.
DoH protects DNS communication in transit through HTTPS encryption and authentication. It improves transport security compared with unencrypted DNS, but it does not automatically protect against malware, phishing or compromised resolvers.
A DoH resolver is a DNS service that receives DNS queries through HTTPS and returns DNS responses. It may use cached information or perform recursive resolution.
DoH can protect the connection between the client and resolver against certain network-level interception and modification attempts. DNSSEC provides additional mechanisms for validating DNS data. Neither should be considered a complete defence against every DNS-related threat.
Yes. DoH and DNSSEC are compatible. DoH encrypts DNS communication between a client and resolver, while DNSSEC helps validate the authenticity and integrity of DNS data.
It can sometimes improve DNS lookup performance through efficient connections, resolver caching and nearby infrastructure. However, it does not guarantee faster internet access because performance depends on network conditions, resolver response times and connection overhead.
Yes. Several modern browsers support DoH or secure DNS settings. The configuration options and available providers depend on the browser version and platform.
Yes. DoH can be supported by mobile browsers, applications and operating-system configurations. The exact implementation depends on the device and software.
DoH makes DNS queries harder for an internet service provider to inspect directly when the queries travel through an encrypted connection to an external resolver. However, the ISP may still observe destination IP addresses, connection metadata and traffic patterns.
application/dns-message identifies the standard DNS wire-format message used in DoH HTTP requests and responses. It allows clients and resolvers to exchange DNS messages using HTTP.
GET places an encoded DNS query in the request URL, while POST sends the DNS message in the HTTP request body. Both methods can be used for DoH communication.
Organisations can apply network and endpoint policies to manage or restrict DoH usage. However, effective control requires consideration of browsers, applications, encrypted traffic and approved resolver configurations.
No. DoH protects DNS communication with a resolver, while a VPN can route broader network traffic through an encrypted tunnel. They serve different purposes and can be used together.
Browser developer tools, JavaScript fetch requests, Python HTTP libraries, DNS diagnostic utilities and supported public DoH resolvers are useful for learning and testing the technology.
More News Click here
Discover thousands of colleges and courses, enhance skills with online courses and internships, explore career alternatives, and stay updated with the latest educational news..
Gain high-quality, filtered student leads, prominent homepage ads, top search ranking, and a separate website. Let us actively enhance your brand awareness.