X-DNS-Prefetch-Control (X-DNS-Prefetch-Control)
Why X-DNS-Prefetch-Control Matters
DNS prefetching improves perceived performance by resolving domain names before they are needed. When a user hovers over or is likely to click a link, the browser pre-resolves the DNS for the target domain. However, this means DNS queries are sent for links the user may never actually click, leaking browsing intent to DNS resolvers.
For most websites, DNS prefetching is a net positive for user experience and the privacy concern is minor. However, for privacy-focused applications (like private messaging, healthcare portals, or anonymous whistleblowing platforms), disabling DNS prefetching prevents this information leakage.
The header's security impact is minimal compared to other headers like CSP and HSTS. It should be low priority in your security header implementation, addressed after the more impactful headers are in place.
How to Check
A security audit checks for the X-DNS-Prefetch-Control header. For most sites, either setting is acceptable. Privacy-sensitive applications should set it to "off". Performance-focused sites may prefer "on" or simply omit the header (prefetching is on by default).