# DNS records, explained simply

> What A, CNAME, MX and TXT records do — and which ones you actually need.

Source: https://veldhost.eu/docs/dns-records-explained

DNS is your domain's address book. Four record types cover almost everything:

- **A** — "this name lives at this server address". Your website needs one for `example.com` and usually one for `www`.
- **CNAME** — "this name is an alias of another name". Handy for subdomains.
- **MX** — "email for this domain goes here". Created automatically when you enable email with us.
- **TXT** — free-form notes machines read: SPF/DKIM/DMARC (email trust) and ownership checks live here.

## Editing records

If your domain uses our nameservers, edit everything under **DNS** in the portal. Changes go live in seconds. If a record exists twice, delete the stale one — the newest is not automatically preferred.

## Rules of thumb

- Don't delete records you don't recognise while email works — MX/TXT often look obscure and matter most.
- TTL = how long the internet caches a record. Lower it before a planned move, raise it after.

## Export and import a zone file

Every zone has a **Download zone file** button on its DNS page. It gives you a standard BIND zone file (RFC 1035) — the same format BIND, PowerDNS, Knot and most DNS hosts read — with every record exactly as our nameservers serve it. The SOA and the apex NS lines are included as comments: they are managed by us and would be ignored on import anyway. Keep a copy before a big change, or take it with you if you ever move your DNS elsewhere.

Going the other way, paste or upload a zone file (up to 256 KB) into **Import a zone file** at the bottom of the same page. You always get a preview first: what would be *added*, what would be *updated*, what is *already in place*, and what we *refuse* — with the reason next to each line, for example an unsupported record type or a value that does not pass the same checks the editor applies. Nothing is written until you confirm.

- Imported: A, AAAA, CNAME, MX, TXT, SRV, CAA, and NS records for subdomains. SOA and apex NS lines are skipped with a note.
- An import only adds and updates. Records already in your zone that the file does not mention are left alone — it never deletes.
- Long TXT values (DKIM keys) are split into 255-character strings automatically; two files that split the same value differently are recognised as the same record.
- Exporting a zone and importing the same file back changes nothing — that is the check we run on it.

The same works over the API: `GET /api/v1/dns/{zone}/export` returns the file, `POST /api/v1/dns/{zone}/import` with `{"zone_file": "...", "dry_run": true}` returns the plan as JSON and, with `dry_run: false`, applies it. Under **Account → Export everything** you can also download every zone file on your account in one zip, together with your domain list and restore points.
