A and CNAME records
The two core DNS records: A points to a server's IP address, CNAME is an alias to another name
📖 Detailed description
The A record (Address) is a direct translation of a name to an IP address, for example yourdomain.com → 192.0.2.10. It is the most fundamental entry - it tells the browser which server to connect to in order to fetch the site. Its IPv6 counterpart is the AAAA record.
The CNAME record (Canonical Name) is an alias - instead of pointing to an IP address, it points to another domain name. For example, www.yourdomain.com as a CNAME to yourdomain.com. The advantage is that when the target IP changes, you only update a single A record and every CNAME alias follows automatically. A key limitation: a CNAME cannot exist on the root domain, nor coexist with other records for the same name - which is why the root domain is almost always set with an A record.
So, A or CNAME record? In short: the root domain and the server use an A record; subdomains pointing to external services (a CDN, site hosting, a SaaS panel) are usually a CNAME. You can check which A and CNAME records your domain has with our free DNS Lookup tool at /dns.
Most common problems
A CNAME on the root domain
The standard forbids it - it breaks email (MX) and other records for that name
An A record with an old IP
After a server move the site still points to a stale address and does not open
A CNAME-to-CNAME chain
Each additional alias slows down name resolution and complicates debugging
Confusing A with CNAME
Setting an alias where an IP address is needed (or vice versa) breaks the service
How to fix it?
Point the root domain with an A record to the server's IP address
Set subdomains pointing to external services (CDN, SaaS) with a CNAME
Never put a CNAME on the domain root - use an A record or your provider's ALIAS/ANAME feature
After changing servers, update the A record and wait for propagation (mind the TTL)
Avoid long CNAME chains - each extra hop is another DNS query
Examples
Good example
Bad example
🔗 Related indicators
SPF record (Sender Policy Framework)
A list of servers allowed to send email on behalf of your domain - the foundation of anti-spoofing protection
DMARC record
The rule that tells servers what to do with mail that fails SPF and DKIM checks
DKIM signature (DomainKeys Identified Mail)
A digital seal attached to every email - proof that the content was not altered in transit
Check this indicator for your website
Get a detailed analysis and personalized tips on how to improve this element on your website.
Start free analysis