Join our Newsletter — 33% off our NHI Course

DNS Query

A DNS query is a request a device sends to a Domain Name System server to resolve a name into an IP address or other DNS record. It carries the queried domain and record type, and the response may be cached, redirected, or used to reach a service.

What a DNS query does

A DNS query is the lookup request that turns a human-readable name into the network address or record a system needs. It is the first step in many connections, but it can also be a point where data is observed, redirected, or manipulated.

The request usually includes the domain name being resolved and the record type the client wants, such as an address record, mail-related record, or service record. Because the query is part of normal traffic, it is easy to overlook, yet it is fundamental to how applications find services across local networks, the internet, and cloud environments.

How DNS queries are processed and answered

Most clients do not speak directly to every authoritative server on the internet. They send the query to a recursive resolver, which may answer from cache, ask other DNS servers on the client’s behalf, or return a referral to another server that can complete the lookup. That recursion and caching behaviour is what makes DNS efficient, but it also means query paths can vary depending on where the request is handled.

The answer may be an IP address, a canonical name, a mail exchanger, a service discovery record, or a negative response saying no record exists. Each of those outcomes affects how the client proceeds next, whether by connecting to a service, retrying another path, or storing the result for later use.

Why DNS queries matter to security and reliability

DNS queries are security-relevant because they influence where traffic goes and what infrastructure a client trusts. A poisoned cache, malicious resolver, forged response, or misconfigured forwarding path can send users to the wrong destination, break service discovery, or expose internal naming patterns. Because DNS is often treated as plumbing, weaknesses in its handling can remain invisible until users experience outages or traffic is diverted.

Queries also leak useful signals. Even when content stays encrypted, query names can reveal service structure, subdomains, partner names, or application behaviour. That is why DNS visibility matters for both defence and privacy, especially in environments where query logs help identify unexpected destinations, failed lookups, or suspicious beaconing patterns.

DNS Logging and Detection Guide is useful here because DNS queries are one of the main telemetry sources for spotting tunnelling, DGA activity, and encrypted DNS bypass.

DNS query visibility, troubleshooting, and control

Practitioners usually look at DNS queries from three angles: inventory, transport, and logging. Inventory tells you which resolvers and forwarders are in use, transport tells you whether queries are exposed or encrypted in transit, and logging tells you whether the organisation can actually see what was requested and how the answer behaved.

That matters when troubleshooting failed lookups, validating split-horizon DNS, confirming that protective DNS controls are working, or investigating why a host reached an unexpected IP address. It also matters when service discovery depends on DNS records, because a bad record can look like an application failure even when the underlying network is healthy.

Sysmon Guide is helpful when DNS query activity needs endpoint-side visibility, especially for process context and DNS-related event monitoring on Windows systems.

For authoritative registries and protocol parameters that underpin DNS operation, IANA remains the canonical reference point for DNS-related identifiers and record ecosystem coordination.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

CIS Controls v8, NIST SP 800-53 Rev 5 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
CIS Controls v8 CIS-8 — Audit Log Management DNS query logging and detection depend on collecting and retaining resolver and endpoint logs.
Recommendation — Log DNS query activity centrally and retain records that support detection and investigation.
NIST SP 800-53 Rev 5 AU-2 — Audit Events DNS queries are audit-worthy network events that support monitoring and investigations.
SI-4 — System Monitoring DNS query patterns can reveal malicious resolution behaviour, tunnelling, or resolver abuse.
SC-20 — Secure Name / Address Resolution Service DNS query handling is the control point for trustworthy name-to-address resolution.
Recommendation — Define DNS query events as auditable and collect them where they matter operationally. Monitor DNS traffic and query anomalies for signs of misuse or compromise. Use trusted name-resolution services and protect the resolution path from tampering.
NIST CSF 2.0 DE.CM-09 — Network Monitoring DNS query telemetry is part of network monitoring for abnormal or malicious activity.
Recommendation — Include DNS query monitoring in network detection coverage and triage.