Configuring DNS Cache settings for Microsoft DNS infrastructure
What is DNS Cache?
DNS cache is a temporary storage mechanism on a DNS server or client that stores the results of DNS query resolutions. When a device or DNS server resolves a domain name (e.g., example.com) to its corresponding IP address, the resolved information is cached for a specific period (defined by the Time-To-Live or TTL value). This allows subsequent queries for the same domain to be answered quickly without needing to re-query upstream DNS servers.
Why do you need to control the DNS Cache for an efficient Microsoft DNS infrastructure?
DNS Caching is essential for optimizing query responses and reducing the load on upstream DNS servers. It stores the results of DNS queries temporarily to improve performance, reduce latency, and minimize network traffic. For Microsoft DNS infrastructures, fine-tuning cache settings ensures that DNS servers handle queries more efficiently while maintaining security and data integrity. Proper cache settings also prevent pollution from malicious DNS responses and allow administrators to customize caching behavior to fit organizational needs.
- Avoid Stale Records: Cached records are stored for a specific duration (TTL). If the TTL is too long, outdated information may be served, leading to errors (e.g., pointing to a decommissioned server). Controlling the TTL allows administrators to ensure that records are updated as frequently as necessary.
- Prevent Cache Pollution: DNS cache pollution occurs when malicious or incorrect data is stored in the cache, potentially redirecting users to harmful sites. By enabling pollution protection, you can ensure that only legitimate data is cached.
- Optimize Resource Usage: DNS cache consumes memory on servers. If the cache size is too large, it can strain server resources. Conversely, a small cache may lead to frequent upstream queries. Controlling cache size and locking critical records ensures efficient use of server resources.
- Reduce Query Traffic: DNS servers that do not optimize caching may send redundant queries to upstream servers, increasing traffic and slowing performance.
- Handle Negative Responses: Controlling negative caching (storing "not found" responses) ensures that the server doesn’t repeatedly query unavailable domains, improving efficiency.
- Improve Scalability: In large or distributed DNS infrastructures, effective caching reduces the burden on central DNS servers, making the system more scalable.
- Support Dynamic Environments: In environments with frequent DNS record changes (e.g., load balancers, dynamic DNS), controlling cache settings ensures that new updates propagate without delays.
DDI Central provides a user-friendly interface to manage and configure DNS cache settings for your Microsoft DNS infrastructure. Follow these steps:
- Log in to DDI Central and navigate to DNS->Config-> DNS Cache.
- On the DNS Cache page that appears, adjust the fields according to your organization's DNS requirements. Each field has a specific purpose, which is explained below.

- MAX TTL: Maximum Time-To-Live (TTL) for cached DNS records, in seconds. It defines how long a DNS record is stored in the cache before being discarded. Higher values reduce repetitive queries but may result in stale records. Adjust based on your network's dynamics.
- MAX NEGATIVE TTL: Time-To-Live for negative responses (e.g., "domain not found"), in seconds. Controls how long a failed DNS lookup result is cached.A lower value ensures faster rechecks for previously failed queries if records are updated.
- MAX KB SIZE: Maximum size of the DNS cache, in kilobytes. A value of 0 disables the cache size limit. Set a limit if memory resources are constrained, especially on smaller servers.
- LOCKING PERCENT: Specifies the percentage of the cache to lock for critical DNS data. Locked data cannot be overwritten, ensuring key records are always available. Keep it at 100% to ensure that critical data is retained.
- POLLUTION PROTECTION: Prevents cache poisoning by ensuring that only legitimate DNS responses are stored. Keep this enabled to safeguard against DNS spoofing attacks.
- STORE EMPTY RESPONSE: Determines whether DNS servers cache empty responses (e.g., when no answer is found). Enable this to avoid repeated queries for the same negative responses, reducing unnecessary traffic.
- IGNORE POLICIES: If enabled, the DNS cache ignores certain policy-based restrictions during query processing. Enable only if your network requires flexible caching without strict policy adherence.
- Once you've configured the settings, click Save to apply them to your Microsoft DNS infrastructure.
Best practices for DNS Cache Settings
- Optimize TTL Values: Use appropriate TTLs based on the frequency of DNS record updates in your organization. Shorter TTLs for dynamic environments (e.g., load-balanced services). Longer TTLs for static or rarely updated records.
- Enable Pollution Protection: Always keep it on to prevent malicious alterations to your DNS cache.
- Monitor Cache Size: Balance cache size based on server resources and traffic patterns. Set a limit if your server experiences memory constraints.
- Adjust Negative TTLs: Keep them low to ensure responsiveness to changes in domain availability, as this helps you to quickly recheck the availability of previously unresolved domains.
By configuring these settings through DDI Central, administrators can ensure faster query resolution, better resource utilization, and enhanced security for your Microsoft DNS infrastructure.