# Quotas for DNS

How many hosted zones and record sets you can have, and how to raise the hosted zones quota.

(The table of quotas is generated on the web page.)
- Creating a zone over the **Hosted zones** quota is refused with `409`; the message starts
  "Quota exceeded: Hosted zones (dns.zones)" and says how many zones you may have and have.
- A new record set over the **Record sets per zone** quota is refused with `409` "A zone holds at
  most … record sets; this one has … and the change would add …". An import that would pass it
  imports nothing ("Nothing imported: A zone holds at most …"). Replacing or editing an existing set
  is always allowed, so a full zone can still be changed. This quota is fixed: a request to raise it
  is refused with "Record sets per zone (dns.records-per-zone) is a fixed limit".

## Request limits

| Limit                         | Value                            |
| ----------------------------- | -------------------------------- |
| Values in a record set        | 100, each up to 4,096 characters |
| Zone file to import           | 1,000,000 characters             |
| Variants in a weighted set    | 20                               |
| Variants in a geolocation set | 50                               |
| Query log lines read at once  | 1,000                            |

## Raise the hosted zones quota

Request an increase with `quotas:RequestServiceQuotaIncrease`, under **Service quotas** in the
Deutsche Cloud Console or with the CLI:

```sh
dcloud quotas requests request-increase --quota-id dns.zones --requested-value 1000 \
  --reason "One zone per customer domain"
```

For an organization on standard quotas, a request for up to twice the standard default is approved
at once, unless a request for this quota was approved that way in the last 24 hours; other requests
are decided by Deutsche Cloud staff. Requests from an organization on trial quotas are never approved
at once; its quota-exceeded message asks it to have Deutsche Cloud support move it to standard quotas.

A request is refused with `400` when it asks for no more than the current quota ("The quota is
already …; ask for more than that") or for more than 5,000 ("5,000 is the most this quota can be
set to; for more, contact Deutsche Cloud support"), and with `409` "A request for this quota is
already open; cancel it to ask for a different value" while another one is open.

## Related

- [Create a hosted zone](create-a-hosted-zone.md)
- [Record sets](record-sets.md)
