You’re setting up DNS for a new domain. Vercel’s docs say “add an A record.” A YouTube tutorial says “use CNAME.” You tried CNAME at the apex — your DNS provider rejected it, or accepted it but MX records stopped working. The two record types serve overlapping purposes but have a critical RFC-level constraint: CNAME cannot coexist with any other record at the same name. Since the apex (root) needs other records (NS, SOA, MX), it can’t use CNAME. Subdomains generally can. Hosting platforms publish exact instructions; trust those over generic tutorials.
Common causes
Ordered by hit rate, highest first.
1. Tried to use CNAME at apex
DNS spec (RFC 1912) prohibits CNAME at the zone apex. Your provider rejects with “CNAME conflicts with NS” or similar, or accepts but causes MX delivery to fail.
How to spot it: DNS provider error message mentions “CNAME and apex,” “CNAME flattening required,” or you have CNAME at root and MX records aren’t responding.
2. Followed two different documentation sources
One source says use A, another says CNAME. You configured both for the same name. DNS provider may reject or accept silently with unpredictable behavior.
How to spot it: DNS panel shows two records at the same name. Should be one or the other.
3. Used A record where CNAME was needed
Some hosts (Vercel www, Netlify) provide a CNAME target that resolves to load-balanced IPs. Hardcoding the A record means you’ll point to a stale IP when the host rotates servers.
How to spot it: Host docs say “CNAME to xxx.vercel-dns.com” but you set A 76.x.x.x. Site may work today, break tomorrow.
4. Used CNAME where A was needed
Vercel apex requires A 76.76.21.21 — not CNAME. Some platforms support “ALIAS” or “ANAME” as a CNAME-like option at apex. If your DNS provider doesn’t, you must use A.
How to spot it: Platform doesn’t support apex CNAME; you set CNAME at apex; platform refuses to issue SSL or shows “DNS verification failed.”
5. Mixed records during migration
You migrated hosts. Old A record still there, new CNAME pointing elsewhere. DNS round-robins between them or picks one inconsistently.
How to spot it: Two records at the same name, pointing different places. Site sometimes loads new, sometimes old.
6. Used ANAME/ALIAS but DNS provider treats it as CNAME
ANAME and ALIAS are non-standard extensions for apex CNAME-like behavior. Some DNS providers implement them; others map ANAME to CNAME under the hood and break MX.
How to spot it: Provider documentation about ANAME compatibility. Test by adding MX record; if it disappears or conflicts, ANAME is implemented as CNAME.
Shortest path to fix
Step 1: Check what your hosting platform requires
Look up the platform’s docs:
| Platform | Apex | www |
|---|---|---|
| Vercel | A 76.76.21.21 | CNAME cname.vercel-dns.com |
| Netlify | A 75.2.60.5 (or ALIAS if supported) | CNAME yoursite.netlify.app |
| Cloudflare Pages | Cloudflare nameservers + flatten CNAME | CNAME yoursite.pages.dev |
| Firebase Hosting | A records given in console | CNAME given in console |
| GitHub Pages | A 185.199.108.153, 109.153, 110.153, 111.153 | CNAME username.github.io |
| AWS S3 | A ALIAS to CloudFront/S3 | CNAME to CloudFront |
Use the exact values from your platform’s docs.
Step 2: For apex, use A or ALIAS/ANAME
If your DNS provider supports ALIAS/ANAME (Route 53, Cloudflare, DNS Made Easy), you can use it for apex to follow a CNAME-like target. Otherwise, A record with IP.
For Cloudflare: enable “CNAME flattening” on apex. Cloudflare resolves the CNAME and serves A response.
Step 3: For subdomains, use CNAME
www, blog.yourdomain.com, staging.yourdomain.com — all should be CNAME to the platform’s target.
Step 4: Remove conflicting records
Don’t have both A and CNAME at the same name. Pick one.
Step 5: Verify
dig yourdomain.com # Should show A
dig www.yourdomain.com # Should show CNAME → ...
If types don’t match expectation, fix.
Step 6: Wait for propagation, then re-verify
15-30 minutes after change. dig from multiple resolvers. Once all show new values, browser refresh.
Prevention
- Trust your hosting provider’s docs for their setup, not generic tutorials.
- Document which record type you picked per name in your DNS provider notes.
- Apex domain: always A or ALIAS/ANAME, never CNAME.
- Don’t mix record types at the same name; pick one and remove conflicts.
- If you change hosts, completely remove the old records before adding new ones.
Related
- DNS A vs CNAME explained
- Domain points to wrong hosting provider
- www vs root redirect
- Custom domain works on Vercel but not Firebase
- Site Opens Intermittently After Domain Connect
- SSL Mixed Content Warning in Browser
- MX Records Got Overwritten — Email Broken
- RSS / OG URLs Still Use Placeholder Domain
- Cert Rejected: Certificate Transparency Log Mismatch
- Cloudflare Orange Cloud vs Grey Cloud: Wrong Toggle Breaks Site
- DNSSEC Validation Fails After Enabling at Registrar
- HSTS Preload Stuck: Can’t Roll Back HTTPS Even After Removal
- IPv6 Users Can’t Reach Site: AAAA Record Missing or Broken
- Subdomain NS Delegation Fails: Missing Glue Records
- SSL Cert Auto-Renewal Failed Silently, Site Now Untrusted
Tags: #Troubleshooting #DNS #Debug