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.

Guide2 min readLast updated
On this page
  1. The simple rule
  2. Why services ask for CNAMEs
  3. Examples

Both send a name somewhere. The difference is what they point at.

A recordCNAME
Points toAn IP addressAnother domain name
Allowed on the bare domain (@)YesNo
Can share a name with MX/TXTYesNo
Follows changes to the targetNo — update it manually if the IP changesYes — follows the target automatically
Extra lookupNoOne 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

GoalRecord
yourdomain.co.uk to your Traxio serverA record, @ → server IP
www to the same siteCNAME, www → yourdomain.co.uk
shop to a hosted shop platformCNAME, shop → the platform’s hostname
app to a server you rent elsewhereA 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.

Keep going