Join our Newsletter — 33% off our NHI Course

When is DNS Logging logged?

DNS logging is recorded when a resolver, firewall, or security control observes DNS queries, responses, or related metadata, depending on the platform’s configuration. Teams use it to see what names were requested, by which client, and whether lookups failed or succeeded. If logging is incomplete, investigation and threat hunting lose useful context.

What DNS logging is actually recording

DNS logging is not one single event type, it is the recording of observable DNS activity by the component doing the inspection. In practice that may include queries, responses, client identity or source metadata, the queried name, timestamps, result codes, and sometimes policy actions such as blocking or rewriting. The exact fields depend on the resolver, firewall, security appliance, or cloud service doing the logging.

That means “logged” usually means the event passed through a control point that was configured to retain it, not that every DNS lookup anywhere on the network was captured automatically. When logging is enabled at the right layer, it can show both successful lookups and failures, which is why it is useful for troubleshooting and threat investigation.

When DNS logs are created in the request and response path

DNS logs are typically written when a client sends a query, when the resolver returns an answer, or when the control decides to record an intermediate or denied lookup. Some platforms log only the request, some log both sides of the exchange, and some also record inspection outcomes such as NXDOMAIN, timeout, sinkhole, or policy-denied results. The logged moment is therefore tied to the platform’s inspection point, not to a universal DNS standard.

If DNS traffic is encrypted, forwarded through a separate recursive resolver, or handled by a security layer in front of the real resolver, the logging point can move. Teams often discover gaps only after an incident when they realise the endpoint, network device, and upstream resolver each saw different pieces of the transaction. The operational question is not just whether DNS logging exists, but where in the path it is anchored and what it can actually observe.

Why logging completeness matters for investigation and hunting

DNS logs are most valuable when they preserve enough context to reconstruct what was requested, from which client, and what happened next. That context helps identify domain generation, beaconing, tunnelling, misconfigurations, and simple resolution failures that would otherwise look like generic connectivity issues. The fewer fields retained, the harder it becomes to separate normal application chatter from suspicious name resolution activity.

For that reason, logging that captures only a subset of events can be misleading. A resolver that logs successes but not failures, or a firewall that logs only blocked traffic, can create blind spots in incident response. Good DNS telemetry is the one that lets an analyst correlate query volume, client behaviour, and outcome patterns over time, rather than relying on isolated point events.

Risk and Threat Considerations

Incomplete DNS logging creates a visibility gap that affects both operations and security. Attackers often exploit name resolution because it is routine, high-volume, and easy to blend into normal traffic, so weak logging can hide reconnaissance, command-and-control lookups, and staging activity.

Failure mechanism: The control either records too little metadata, logs at the wrong layer, or loses events before they reach retention, which removes the context needed to link a request to a client, timing pattern, or policy action.

Impact: Investigations slow down, threat hunting loses fidelity, and teams may miss early indicators that a host is reaching suspicious infrastructure or that a policy change has broken resolution for legitimate applications.

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 logging is audit data that must be collected and retained for investigation.
Recommendation — Centralise DNS log collection and retention so investigators can reconstruct lookup activity.
NIST SP 800-53 Rev 5 AU-2 — Event Logging DNS queries, responses, and policy decisions are loggable security events.
AU-12 — Audit Record Generation The question asks when DNS logging is actually produced by a control point.
Recommendation — Define DNS events to log and ensure resolvers and controls emit them consistently. Configure the DNS control point to generate records for queries, responses, and denials.
NIST CSF 2.0 DE.CM-01 — Networks and network services are monitored to find potential cybersecurity events DNS telemetry is a core network-service monitoring source for detection and hunting.
Recommendation — Monitor DNS activity continuously so suspicious resolution patterns are detectable.

Practitioner Guidance

What to verify: Confirm exactly which DNS events are logged, at which layer, and whether the record set includes query name, client source, response result, and policy outcome. If those fields are split across devices, document how they will be correlated during an investigation.

What good looks like: The logging path should be consistent enough that an analyst can trace one client’s lookup history without guessing which control point saw the traffic first. If the organisation relies on DNS for detection, the retained data should support both outage analysis and suspicious-domain review.

Practitioner takeaway: Treat DNS logging as a visibility control, not a binary feature, because its value depends on where the observation happens and how much context survives that observation.