A record vs CNAME: which should I use?
The difference between an A record and a CNAME, the situations where each is required, and a simple rule for choosing.
Both send a name somewhere. The difference is what they point at.
| A record | CNAME | |
|---|---|---|
| Points to | An IP address | Another domain name |
Allowed on the bare domain (@) | Yes | No |
| Can share a name with MX/TXT | Yes | No |
| Follows changes to the target | No — update it manually if the IP changes | Yes — follows the target automatically |
| Extra lookup | No | One more step to resolve the target |
The simple rule
- You’ve been given an IP address → A record.
- You’ve been given a hostname → CNAME.
- It’s the bare domain → always an A record.
Why services ask for CNAMEs
A platform like a hosted shop or email marketing tool can move its servers without asking every customer to update their DNS. Your CNAME points at their name; they change what their name points to.
Examples
| Goal | Record |
|---|---|
yourdomain.co.uk to your Traxio server | A record, @ → server IP |
www to the same site | CNAME, www → yourdomain.co.uk |
shop to a hosted shop platform | CNAME, shop → the platform’s hostname |
app to a server you rent elsewhere | A record, app → that server’s IP |
New to Traxio? Hosting is £0.99 a month. See what’s included
Spotted something out of date or unclear? Tell us and we’ll fix it.