Skip to Content
Open Beta — managed Kubernetes, DNS & more are live.
🧭

DNS zones and records

Updated 2026-11-20
On this page

DNS zones and records

DNS zones hold the records that map your domain names to addresses and services. Create a zone, then add records such as A, AAAA, CNAME, MX and TXT.

A zone is the container for one domain's records, for example example.com. Inside it you create record sets that answer DNS queries: an A record points a name at an IPv4 address, a CNAME aliases one name to another, MX records route mail, and TXT records carry verification and policy data such as SPF and DKIM.

For the internet to use your zone, your registrar must delegate the domain to Patrii name servers. Patrii Cloud can check that delegation for you and confirm when it is in place. You can also verify domain ownership, lock a zone against accidental change, and review an audit log of every modification.

Screenshot — The DNS > Zones list showing zones and their record counts
The DNS > Zones list showing zones and their record counts

Key concepts

Zone — The record container for one domain, e.g. example.com.

Record set — One name and type with one or more values, for example an A record with two addresses.

TTL — Time to live: how long resolvers may cache a record before asking again.

Delegation — Pointing your registrar's name servers at Patrii so the internet uses this zone.

Zone lock — A guard that blocks modifications until you unlock the zone.

Domain verification — Proving ownership of a domain, via a TXT or CNAME record, before certain operations.

Before you start

  • A domain you control (registered with Patrii or elsewhere).
  • The ability to update name servers at your registrar if the domain is registered elsewhere.
  • The addresses or targets your records should point to.

Step by step

  1. Create the zone

    Go to DNS and choose Create zone, then enter your domain name.

    Screenshot — The Create zone form
    The Create zone form
  2. Add records
    • Add record sets for your services, for example an A record for the apex and a CNAME for www.
    • Set a TTL; shorter values propagate changes faster, longer values cache better.
    Screenshot — The add-record form with type, name, value and TTL
    The add-record form with type, name, value and TTL
  3. Delegate the domain

    At your registrar, set the domain's name servers to the Patrii name servers shown for the zone.

    Screenshot — The zone page listing the Patrii name servers to use
    The zone page listing the Patrii name servers to use
  4. Confirm delegation

    Run the NS delegation check on the zone to confirm the internet is now using Patrii for this domain.

    Screenshot — The NS delegation check result
    The NS delegation check result
  5. Lock the zone (optional)

    Lock the zone to prevent accidental edits; unlock it when you next need to change records.

Examples

Create a zone and an A record
patrii dns create --name example.com. --email hostmaster@example.com
patrii dns list    # note the zone ID
patrii dns record create <zone-id> \
  --type A --name example.com. --record 203.0.113.10 --ttl 300
Add a CNAME and an MX record
patrii dns record create <zone-id> --type CNAME \
  --name www.example.com. --record example.com.
patrii dns record create <zone-id> --type MX \
  --name example.com. --record "10 mail.example.com."
Manage a zone and its records with Terraform
resource "patrii_dns_zone" "main" {
  name  = "example.com."
  email = "hostmaster@example.com"
}

resource "patrii_dns_record" "www" {
  zone_id = patrii_dns_zone.main.id
  name    = "www.example.com."
  type    = "A"
  records = ["203.0.113.10"]
  ttl     = 300
}

Limits & specifications

Supported record types:

TypePurpose
AMaps a name to an IPv4 address.
AAAAMaps a name to an IPv6 address.
CNAMEAliases one name to another name.
MXRoutes mail to a mail server, with a priority.
TXTFree-form text, used for SPF, verification and more.
SRVAdvertises the host and port of a service.
CAADeclares which authorities may issue certificates for the domain.
NSDelegates a subdomain to other name servers.
PTRMaps an address back to a name (reverse DNS).
SPF, SSHFP, SOASender policy, SSH key fingerprints, and the zone's start-of-authority.

Best practices

  • Use a short TTL (such as 300 seconds) before a planned change, then raise it once the record is stable.
  • Point mail (MX), SPF and DKIM/TXT records carefully; small mistakes here cause silent mail delivery failures.
  • Prefer an A record over a CNAME at the apex of a domain, since a CNAME cannot coexist with other records at the same name.
  • Lock zones that rarely change to avoid accidental edits, and review the audit log after any change.
  • After delegating, always run the NS check rather than assuming propagation is done.

FAQ

I added records but nothing resolves. Why?
Almost always the domain is not yet delegated. Set the domain's name servers at your registrar to the Patrii name servers shown on the zone, then run the NS delegation check.
How long do changes take to take effect?
Resolvers cache records for the record's TTL. A change is visible everywhere once the previous TTL has elapsed, so lower the TTL before making time-sensitive changes.
Can I use a CNAME at the root of my domain?
No. The apex must carry other records (such as NS and SOA), and a CNAME cannot coexist with them. Use an A or AAAA record at the apex instead.
Why is my zone read-only?
It is probably locked. Unlock the zone to make changes, then lock it again when you are done.

Learn more

Everything you can do here in the console is also available through the Patrii Cloud API for automation and scripting.

Was this article helpful?
Thank you for your feedback. Still stuck? Contact us