Skip to main content

Entry function

The Scriptable DNS pipeline executes through a statically defined function handleQuery. To return a response to the query, you can return one of the DNS response objects as documented in the Query Response Object Types.
console.log is intended for use within the Script Editor only. Please remove all logging statements before saving or publishing, as they may cause your script to fail at runtime.

Query object

The entry function is passed a DnsRequest object parameter called query that contains the information about the request, such as the hostname, country, remote IP, etc.

DnsRequest

DnsQuery

GeoLocation

Last modified on July 10, 2026