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

# DNS CLI Reference

> Complete openstack zone and recordset CLI commands for managing Xloud DNS — zones, records, PTR records, and zone transfers.

## Overview

The `openstack zone` and `openstack recordset` command groups manage authoritative DNS zones and all record types.

<Note>
  **Prerequisites**

  * CLI installed and authenticated — see [CLI Setup](/cli-setup)
  * Python designateclient installed: `pip install python-designateclient`
</Note>

***

## Zones

<CodeGroup>
  ```bash title="List zones" theme={null}
  openstack zone list
  ```

  ```bash title="Create primary zone" theme={null}
  openstack zone create \
    --email admin@example.com \
    --ttl 3600 \
    example.com.
  ```

  ```bash title="Create secondary zone" theme={null}
  openstack zone create \
    --type SECONDARY \
    --masters 192.0.2.1 \
    example.com.
  ```

  ```bash title="Show zone" theme={null}
  openstack zone show example.com.
  ```

  ```bash title="Delete zone" theme={null}
  openstack zone delete example.com.
  ```
</CodeGroup>

***

## Record Sets

<CodeGroup>
  ```bash title="List record sets in zone" theme={null}
  openstack recordset list example.com.
  ```

  ```bash title="Create A record" theme={null}
  openstack recordset create \
    --type A \
    --record 203.0.113.10 \
    example.com. web
  ```

  ```bash title="Create AAAA record" theme={null}
  openstack recordset create \
    --type AAAA \
    --record "2001:db8::1" \
    example.com. web
  ```

  ```bash title="Create CNAME record" theme={null}
  openstack recordset create \
    --type CNAME \
    --record web.example.com. \
    example.com. www
  ```

  ```bash title="Create MX record" theme={null}
  openstack recordset create \
    --type MX \
    --record "10 mail.example.com." \
    example.com. @
  ```

  ```bash title="Create TXT record" theme={null}
  openstack recordset create \
    --type TXT \
    --record '"v=spf1 include:_spf.example.com ~all"' \
    example.com. @
  ```

  ```bash title="Show record set" theme={null}
  openstack recordset show example.com. web
  ```

  ```bash title="Delete record set" theme={null}
  openstack recordset delete example.com. web
  ```
</CodeGroup>

***

## PTR Records (Reverse DNS)

<CodeGroup>
  ```bash title="Set PTR record for floating IP" theme={null}
  openstack ptr record set \
    --description "Web server" \
    --ttl 300 \
    RegionOne:$(openstack floating ip show <fip> -c id -f value) \
    web.example.com.
  ```

  ```bash title="List PTR records" theme={null}
  openstack ptr record list
  ```

  ```bash title="Delete PTR record" theme={null}
  openstack ptr record delete \
    RegionOne:<floating-ip-id>
  ```
</CodeGroup>

***

## Zone Transfers

<CodeGroup>
  ```bash title="Create zone transfer request" theme={null}
  openstack zone transfer request create example.com.
  ```

  ```bash title="Accept zone transfer" theme={null}
  openstack zone transfer accept request \
    --transfer-id <transfer-id> \
    --key <transfer-key>
  ```

  ```bash title="List transfer requests" theme={null}
  openstack zone transfer request list
  ```
</CodeGroup>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Create Zone Guide" href="/services/dns/create-zone" color="#197560">
    Step-by-step guide to creating DNS zones and records
  </Card>

  <Card title="Reverse DNS Guide" href="/services/dns/reverse-dns" color="#197560">
    Configure PTR records for floating IPs
  </Card>
</CardGroup>
