Guides / A record vs CNAME
A record vs CNAME
When to use which, and why a CNAME cannot sit on the root.
The one-line answer
An A record points a name at an IP address. A CNAME points a name at another name.
| A / AAAA | CNAME | |
|---|---|---|
| Points to | An IP address | Another hostname |
| Use when | You know the server's IP — a VPS, a dedicated box | A platform tells you to (GitHub, Vercel, Blogger) |
| If the target moves | You must update it yourself | It follows automatically |
| At the root | Fine | Not allowed |
Why a CNAME cannot sit on the root
A CNAME says “everything about this name lives over there instead.” If you put one on
myname.ajaira.site itself, it would swallow every other record
on that name — your TXT verification, your MX mail routing, all of it. The DNS specification
forbids it, and our DNS manager rejects it before you can make the mistake.
So: use A or AAAA on @, and save CNAMEs for
labels like www.
Rules of thumb
- Given an IP? Use A (or AAAA for IPv6).
- Given a hostname? Use CNAME.
- Setting up the bare subdomain? A record, always.
- Never point a CNAME at your own name. That is a loop and it resolves to nothing.