Skip to main content
Each response object usually consists of a constructor that receives a string representation of the value and a TTL value parameter that determines how long the response client should cache the object. Objects can be returned as a single object or as an array of objects depending on the desired output.

Supported response objects

Example response

Below is an example code snippet to illustrate how to return a dynamic DNS response to a DNS query. If the request is coming from Germany, then 222.222.222.222 is returned, otherwise, 111.111.111.111 is returned.

ARecord

The ARecord represents the A type DNS answer to return A records.

AaaaRecord

The AaaaRecord represents the AAAA type DNS answer to return AAAA records.

Cname Record

The CnameRecord represents the CNAME type DNS answer to return CNAME records.

PullZoneRecord

The PullZoneRecord is used to map the response to a Pull Zone response, meaning the DNS system will automatically map the response to the appropriate A or AAAA records for this specific pull zone.