> ## Documentation Index
> Fetch the complete documentation index at: https://developers.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

<AccordionGroup>
  <Accordion title="Geography">
    `country`, `continent`, `region`, `geodns`, and `geodistance` select against country codes, continent codes, regions, or record coordinates.
  </Accordion>

  <Accordion title="Network">
    `asn` selects by autonomous system number. `ip` selects by IP address or prefix metadata.
  </Accordion>

  <Accordion title="Distribution">
    `weighted_shuffle` uses per-record weights. Larger weights receive proportionally more selection over a sufficient sample.
  </Accordion>

  <Accordion title="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.
  </Accordion>
</AccordionGroup>

## 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.
</Warning>

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.