Documentation
DNS & Domains
Adding a domain, editing zone records, and knowing whether a change has actually taken effect yet.
DNS behaves the same everywhere — the record types, delegation model, and caching rules below are standard and not specific to any provider. The values unique to your account (nameserver hostnames, the IP address or target your records should point at, and where you edit the zone) are provided during onboarding and appear here as marked placeholders.
How DNS resolution actually works
Three separate systems are involved, and knowing which one you have changed tells you how long the change takes:
- The registrar holds your registration and the list of nameservers for the domain. Changing nameservers happens here and is published to the TLD registry.
- The authoritative nameservers hold the zone — the actual records. Changing a record happens here.
- Resolvers (your ISP's, your router's, your operating system's, public resolvers) cache answers for as long as the record's TTL says they may. This is where delay comes from.
Nothing "propagates" in the sense of being pushed outwards. Authoritative servers change instantly; everything else simply keeps serving the old answer until its cached copy expires.
Record types you will use
| Type | Points to | Use it for |
|---|---|---|
A | An IPv4 address | Pointing a hostname at a server. The most common record you will create. |
AAAA | An IPv6 address | The IPv6 equivalent of A. Add it only if the server actually answers on IPv6 — a stale AAAA causes intermittent failures that are hard to diagnose. |
CNAME | Another hostname | Aliasing one name to another (www to the apex, or a subdomain to a platform-supplied hostname). Cannot coexist with other records on the same name. |
MX | A mail host, with a priority | Routing inbound email. Lower priority number wins; list every host your mail provider specifies. |
TXT | Arbitrary text | SPF, DKIM, DMARC, and domain-ownership verification tokens. |
NS | A nameserver hostname | Delegating a zone or subzone. The set at the apex must match what the registrar publishes. |
CAA | A certificate authority | Restricting which CAs may issue certificates for the domain. See SSL / TLS Setup. |
SRV | A host and port, with priority and weight | Service discovery for protocols that use it — SIP, XMPP, some autodiscovery. |
PTR | A hostname, from an IP | Reverse DNS. Lives in the IP owner's zone, not yours — request it from whoever controls the address block. |
Some providers also offer an apex-level alias — variously called ALIAS,
ANAME, or a flattened CNAME. It is a provider feature, not a
DNS record type, and it exists because a real CNAME is not allowed at the
zone apex. If your provider offers one, it is the correct way to point a bare domain
at a hostname rather than an IP.
Adding a domain
-
Confirm who controls the domain. You need login access at the
registrar, and the domain must not be locked in a way that blocks nameserver
changes. Check its current state first:
whois example.com | grep -i -E "registrar|name server|status" - Lower the TTL on records you are about to change, and wait for the old TTL to elapse before changing them. See Propagation timing. Skipping this is the single most common cause of a longer-than-necessary cutover.
- Create the zone and its records at the new DNS host before delegating. If the zone is empty when delegation takes effect, the domain stops resolving for everyone until you fill it in.
- Delegate the nameservers at the registrar. Replace the full set with the set you were given — not a mix of old and new, which produces inconsistent answers depending on which nameserver a resolver happens to ask. Nameservers for your account: provided during onboarding.
- Verify delegation has taken effect at the registry, then verify the records resolve. Both checks are in Verifying a change.
- Then issue the certificate. Validation depends on DNS being correct, so it comes after this, not before. See SSL / TLS Setup.
Moving nameservers moves the whole zone, including MX, SPF, DKIM, and
DMARC records. If email for the domain is handled elsewhere, copy those records into
the new zone before you delegate. Mail that bounces during a cutover is not
always retried.
Editing zone records
A few conventions make zone edits predictable:
- Mind the trailing dot. In standard zone syntax,
example.com.is absolute andexample.comis relative to the zone — meaning it can silently expand toexample.com.example.com.. Web-based editors usually handle this for you; files and APIs usually do not. - Know what the editor means by the name field. Some interfaces want the label only (
www), some want the fully qualified name (www.example.com), and@conventionally means the zone apex. - Change one thing at a time when something is not working. Two simultaneous edits and one cache make for an unfalsifiable theory.
- Keep a copy of the zone before a bulk change. If your provider offers a zone-file export, take one; it is the fastest possible rollback.
TTL, in practice
| TTL | When to use it |
|---|---|
300 (5 min) | During a migration, or on any record you expect to change within the next few days. |
3600 (1 hour) | A reasonable everyday default for records that change occasionally. |
86400 (1 day) | Records that essentially never change — MX, SPF, verification TXT records — once they are settled. |
A low TTL costs slightly more lookups and nothing else. Set it low before a change, and raise it again once the change has settled.
Propagation timing
What to expect, and why:
- Editing a record in an existing zone: authoritative immediately; visible to everyone else once the previous TTL expires. The new TTL applies to the new answer, not to the cached old one — which is why lowering TTL has to happen ahead of time.
- Changing nameservers at the registrar: the TLD registry usually publishes within minutes to a few hours, but resolvers cache the delegation too, commonly for a day or two. Plan for up to 48 hours before every resolver in the world agrees, even though most will follow far sooner.
- A brand-new domain or a newly created record: often faster than a change, because there is no previous answer cached. Some resolvers do cache negative answers (
NXDOMAIN) for a period set by the zone's SOA, so a name you queried before creating it may lag.
If a change looks like it has not applied, query the authoritative nameserver directly before assuming the edit failed. If the authoritative server has the new value, the edit worked and you are simply waiting on a cache.
Verifying a change
# What does your normal resolver say? (subject to caching)
dig +short www.example.com A
# Which nameservers does the registry delegate to?
dig +short NS example.com
# Ask an authoritative nameserver directly — bypasses every cache
dig @ns1.your-dns-host.example www.example.com A +noall +answer
# Follow the delegation from the root down; shows exactly where it breaks
dig +trace www.example.com
# Check a second, independent resolver
dig @9.9.9.9 +short www.example.com
# Mail and policy records
dig +short MX example.com
dig +short TXT example.com
dig +short TXT _dmarc.example.com
On Windows, nslookup -type=A www.example.com 9.9.9.9 is the closest
equivalent. dig is available on macOS and most Linux distributions;
on Debian and Ubuntu it is in the dnsutils package.
Your own machine may also be caching. Flushing the local resolver cache rules out one variable, but it does not affect anyone else.
Common pitfalls
- A
CNAMEat the apex. Not permitted — the apex must carrySOAandNSrecords, and aCNAMEcannot coexist with them. Use anA/AAAArecord, or your provider's apex alias feature. - A
CNAMEalongside other records on the same name. Same rule, same failure. Ifwwwhas aCNAME, it cannot also have aTXTrecord. - More than one SPF record. A domain must publish exactly one
TXTrecord startingv=spf1. Two records is a permanent error, not a merge — combine them into one instead. - An old
AAAArecord. If the name has an IPv6 address that no longer works, clients with IPv6 fail while everyone else succeeds. Remove it, or make it correct. - Partial nameserver changes. Leaving one old nameserver in the registrar's set means some queries get answers from a zone you are no longer editing.
- A wildcard record masking a mistake. A
*record answers for every name you did not define, so a typo'd hostname resolves anyway and appears to work. - Assuming a browser is telling the truth. Browsers keep their own DNS cache and pin connections. Verify with
dig, not with a reload.