Overview
The DNS Resolver Override feature allows you to specify a custom DNS server instead of using the default resolver provided by the operating system. This is useful for a variety of use cases, such as:
Comparing the performance of public DNS resolvers like Google (8.8.8.8) and OpenDNS.
Validating DNS-based geo-balancing or geo-targeting configurations.
Implementation
You can configure DNS Resolver Override in two ways:
Via HTTP Request Header
Navigate to the HTTP Request Header section under the Request tab. Here, you can add a custom DNS resolver using the DNS-Resolver-Override header.
Via Transaction Script using setHeader()
This method is available for API (JavaScript) monitors. Here's an example of how to set it:
// Step - 1
setHeader("DNS-Resolver-Override", "8.8.8.8")
open("https://www.URL.com")
For Object Monitors
When configuring an Object test, you can apply the DNS override directly in the Request settings by adding a custom HTTP header.
Note: this option forces the agent to not cache the DNS response locally on the operating system. This ensures that there is no cross-test pollution of DNS records which might cause geo-targeting problems for certain companies.