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.
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
- Create the zone
Go to DNS and choose Create zone, then enter your domain name.
Screenshot — The Create zone formThe Create zone form - 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 TTLThe add-record form with type, name, value and TTL - Add record sets for your services, for example an A record for the apex and a CNAME for
- 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 useThe zone page listing the Patrii name servers to use - 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 resultThe NS delegation check result - Lock the zone (optional)
Lock the zone to prevent accidental edits; unlock it when you next need to change records.
Examples
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
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."
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:
| Type | Purpose |
|---|---|
A | Maps a name to an IPv4 address. |
AAAA | Maps a name to an IPv6 address. |
CNAME | Aliases one name to another name. |
MX | Routes mail to a mail server, with a priority. |
TXT | Free-form text, used for SPF, verification and more. |
SRV | Advertises the host and port of a service. |
CAA | Declares which authorities may issue certificates for the domain. |
NS | Delegates a subdomain to other name servers. |
PTR | Maps an address back to a name (reverse DNS). |
SPF, SSHFP, SOA | Sender 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?
How long do changes take to take effect?
Can I use a CNAME at the root of my domain?
Why is my zone read-only?
Learn more
Everything you can do here in the console is also available through the Patrii Cloud API for automation and scripting.