When adding a DNS record for a domain or subdomain, you pick a type. Most often it’s A or CNAME. They are essentially different.
\n
A record
\n
Points to a specific IP address. E.g. yourdomain.tj → 195.158.10.20.
\n
- Browser immediately gets the IP and goes to the server
- The fastest type of resolution
- If the server IP changes — you must update the record manually
\n
CNAME record
\n
Points to another domain name. E.g. shop.yourdomain.tj → mystore.example.com.
\n
- Browser does an extra lookup: “where is example.com?” — an extra step
- Useful when the service changes IPs — you bind to their domain, they update their A
- Suitable for CDN, SaaS services, GitHub Pages
\n
Which to pick
\n
- A: for your own hosting where you know the IP and it’s stable
- CNAME: for external services (Netlify, Vercel, Cloudflare, GitHub Pages, Heroku)
\n
Important rule
\n
The root domain (yourdomain.tj without subdomain) cannot be a CNAME — only A or AAAA. This is a technical standard. For subdomains — both types are valid.
\n
Modern DNS providers (Cloudflare, Navju Cloud DNS) support “CNAME flattening” — they work around this limit, but it’s non-standard.
