Skip to content

CNAME vs A record

Both records point a name somewhere, but in different ways.

A record CNAME record
Points to An IP address, e.g. 192.0.2.10 Another name, e.g. example.com or shops.myshopify.com
Use it for Your domain itself (@) and subdomains on your own server Subdomains such as www, shop or blog that should follow another name
If the target changes You must update the IP yourself It updates automatically, because it follows the other name
Can share its name with other records? Yes No. A CNAME must be the only record for that name
  • Pointing example.com (@) to your Ruachost hosting or another server
  • When a service gives you an IP address
  • Making www.example.com follow example.com
  • When a service gives you a hostname, for example shop → shops.myshopify.com

Your root domain (example.com) must have other records, such as NS, SOA, MX for email and TXT for SPF. A CNAME can’t share its name with any other record, so the root domain can’t be a CNAME. Use an A record for @, and a CNAME for www.

Some DNS providers offer an ALIAS or ANAME record, which works like a CNAME at the root. Ruachost DNS doesn’t use these. If a platform asks for one, use the A record it also provides, or point www with a CNAME and redirect the root domain to www.