---
url: /apranik/configuration/dns/rule.md
---
# DNS rule

Which [DNS server](server.md) answers which names, in `dns.rules`. Rules are
checked in order and the first match wins; `default_server` answers the rest.

## Structure

```json
{
  "match": { "domain_suffix": ["ir"] },
  "server": "domestic"
}
```

## Fields

### `match`

object
Required

A [routing match](../routing/rule.md#match) limited to the name: `domain`,
`domain_suffix`, `domain_keyword`, `domain_regex`, `domain_in_dataset`, and `any`,
`all` and `not` over them.

### `server`

string
Required

The tag of the DNS server that answers.
