> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloud.aptranet.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Routing policies

> Route DNS answers with weighted, geographic, network, distance, fallback, and limiting pickers.

Routing policies are represented as an ordered picker chain. Resource-record metadata supplies the values each picker evaluates.

## Presets

| Preset | Behavior |
| - | - |
| Simple | Return all enabled answers |
| Weighted | Split selection using per-record weights |
| Geo country | Match the resolver location to country metadata |
| Failover | Prefer primary records and use backup records when needed |
| Advanced | Build a custom picker chain and metadata document |

## Picker types

> **Geography**
>
> `country`, `continent`, `region`, `geodns`, and `geodistance` select against country codes, continent codes, regions, or record coordinates.

> **Network**
>
> `asn` selects by autonomous system number. `ip` selects by IP address or prefix metadata.

> **Distribution**
>
> `weighted_shuffle` uses per-record weights. Larger weights receive proportionally more selection over a sufficient sample.

> **Fallback and limiting**
>
> `default` supplies a fallback. `first_n` limits the number of eligible records returned. Pickers can also specify a limit and strict behavior where supported.

## Resource-record metadata

Records can provide `asn`, `continents`, `countries`, `latlong`, `weight`, IP-prefix data, `backup`, `default`, and operator notes. Only include metadata used by the picker chain.

> [!WARNING]
>
> Resolver location is not identical to end-user location, and geolocation is not a legal data-residency control. Enforce tenancy and residency in the application.

Test each policy from representative resolver networks and include an intentional fallback for unmatched traffic.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.