The dnsDomainIs()() function detects whether the URL host name belongs to a given DNS domain. This function is useful when you are configuring the browser not to use proxies for the local domain, as illustrated in Example 1: Proxy All Servers Except Local Hosts and Example 2: Proxy Local Servers Outside the Firewall.
This function is also useful when you are using multiple proxies for load balancing in situations where the proxy that receives the request is selected from a group of proxies based on which DNS domain the URL belongs to. For example, if you are load balancing by directing URLs containing .edu to one proxy and those containing .com to another proxy, you can check the URL host name using dnsDomainIs()().
host is the host name from the URL.
domain is the domain name to test the host name against.
true or false
The following statement would be true:
dnsDomainIs("www.example.com", ".example.com")
The following statements would be false:
dnsDomainIs("www", ".example.com") dnsDomainIs("www.mcom.com", ".example.com")