DNS is the internet's address book. When someone types your domain, their device asks DNS which server to contact. Everything about your domain, from the website to email, is decided by a handful of records.
Registrar, nameservers and records
- The **registrar** is where you bought the domain. It records which nameservers are in charge of it.
- The **nameservers** hold the actual records (the "zone"). They may be at your registrar, your host or a DNS provider.
- The **records** say where each service lives: the website, the mail server, verification codes.
Editing records at your registrar has no effect if the domain's nameservers point somewhere else. Always check which nameservers are active first.
The records you will meet
| Record | What it does | Example |
|---|---|---|
| A | Points a name to an IPv4 address | example.com → 203.0.113.10 |
| AAAA | Points a name to an IPv6 address | example.com → 2001:db8::10 |
| CNAME | Makes a name an alias of another name | www → example.com |
| MX | Says which servers receive email | 10 mail.example.com |
| TXT | Free text, used for SPF, DKIM, DMARC and verification | v=spf1 include:… ~all |
| NS | Lists the nameservers for the zone | ns1.example.net |
Why changes take time: TTL
Every record has a TTL (time to live) in seconds. Resolvers around the world cache the answer for that long. A TTL of 3600 means a change can take up to an hour to be seen everywhere; a change of nameservers can take longer because the parent zone has its own caching.
- A day before a planned change, lower the TTL of the records you will edit (for example to 300).
- Make the change.
- Check it with a DNS checker from several locations.
- Once everything works, raise the TTL again.
Common mistakes
- A CNAME on the root domain (
example.com): most DNS providers do not allow it, and it breaks MX and other records. - Two SPF records: only one
v=spf1TXT record is allowed per name. - Forgetting email when moving a website: if you change nameservers, copy the MX and TXT records to the new zone first.