
When you're pointing a domain at a server or service, you're usually choosing between an A record, a CNAME, or an ALIAS (also called ANAME). They all accomplish the goal of making a domain resolve to something useful — but they work differently, have different limitations, and the wrong choice causes real problems.
An A record (Address record) maps a domain name directly to an IPv4 address:
yourdomain.com A 203.0.113.10
www.yourdomain.com A 203.0.113.10
When a resolver queries for yourdomain.com, it gets back 203.0.113.10 — a direct answer. Simple, fast, and works for any domain or subdomain.
Use an A record when:
yourdomain.com) to your own serverThe limitation: If the IP address changes (you migrate servers, your hosting provider changes your IP), you have to update the A record manually. For services like AWS, Heroku, or Vercel that use dynamic hostnames (not fixed IPs), A records are impractical.
For IPv6 addresses, use an AAAA record — same concept, different address format.
A CNAME record (Canonical Name) creates an alias — it maps one hostname to another hostname, not to an IP address:
www.yourdomain.com CNAME yourdomain.com
shop.yourdomain.com CNAME yourdomain.myshopify.com
app.yourdomain.com CNAME your-app.vercel.app
When a resolver queries www.yourdomain.com, it gets back a CNAME pointing to yourdomain.com, then resolves that to the actual IP. The client sees the final IP, but DNS made two hops.
Use a CNAME when:
www to your apex domainThe critical limitation — no CNAME at the root domain:
You cannot use a CNAME record on your root/apex domain (yourdomain.com itself, without www). This is a hard limitation in the DNS specification (RFC 1034).
The reason: a CNAME says "this name is an alias for another name — don't use any other records for this name." But your root domain needs to have SOA and NS records, which can't coexist with a CNAME.
This means you can't do:
yourdomain.com CNAME your-app.vercel.app ← NOT VALID
This is why modern hosting providers give you both a hostname (for CNAME) and an IP (for A record). If you can't use a CNAME at the root, you use the IP address with an A record — accepting that you'll need to update it if the IP changes.
No CNAME chains: Pointing a CNAME to another CNAME (daisy-chaining) is technically valid but discouraged — it adds latency and creates fragile dependencies. Always point a CNAME to either an A record target or a final hostname.
The ALIAS record (called ANAME by some providers) was invented specifically to solve the "CNAME at root domain" problem. It's not part of the original DNS specification — it's a non-standard feature implemented by DNS providers.
yourdomain.com ALIAS your-app.vercel.app
From the outside, this looks like a regular A record — resolvers receive an IP address. Behind the scenes, your DNS provider resolves the target hostname and returns its current IP. If the target's IP changes, your DNS provider picks this up automatically.
Use an ALIAS when:
The limitation: Not all DNS providers support ALIAS/ANAME. It's a proprietary extension, so support varies:
| DNS Provider | Support |
|---|---|
| Cloudflare | Yes (CNAME flattening — automatic) |
| AWS Route 53 | Yes (ALIAS record) |
| DNSimple | Yes (ALIAS) |
| Namecheap | Limited |
| Standard BIND | No |
Cloudflare is the special case: Cloudflare doesn't have a separate ALIAS record type. Instead, they automatically "flatten" CNAME records at the root domain — you add a CNAME at the root and Cloudflare resolves it to an IP and serves that IP to resolvers. It's ALIAS behaviour without needing a separate record type.
Pointing root domain to your own server with a fixed IP: → Use an A record
Pointing root domain to Vercel, Netlify, AWS ELB, or another service that gives you a hostname: → Use ALIAS/ANAME if your DNS provider supports it; or switch to Cloudflare and use a CNAME (Cloudflare flattens it automatically)
Pointing a subdomain (www, app, api, etc.) to a third-party service:
→ Use a CNAME
Pointing www to your root domain:
→ Use a CNAME: www CNAME yourdomain.com
Pointing www to the same place as your root, when root is an A record:
→ Use an A record for both pointing to the same IP, or a CNAME from www to yourdomain.com
CNAME on root domain: Your DNS provider may accept it, but behaviour is unpredictable. MX records stop working (because a CNAME says "use only the CNAME for this name"), meaning you lose inbound email. Many DNS providers now warn you or prevent this.
A record with a changing IP: Your site goes down when the IP changes until you update the record. Common when using cloud services that don't have fixed IPs.
CNAME chain: a CNAME b, b CNAME c, c A 1.2.3.4 — each hop adds latency. Some resolvers limit chain depth and may fail to resolve entirely.
Missing AAAA record when A record is present: Users on IPv6-only networks may not be able to reach your site. Add AAAA alongside A for full coverage.
Regardless of which record type you use, DNS records can change unexpectedly — and when they do, your site or email breaks immediately.
Domain Monitor monitors your DNS records and alerts you the moment an unexpected change occurs. Whether it's a misconfigured deployment that overwrites your A record, an accidental deletion of a CNAME, or a DNS provider migration that missed a record — you'll know within minutes rather than hours.
Create a free account and add DNS monitoring for your domain. See DNS monitoring is here for Domain Monitor's DNS monitoring features.
For more detail on all DNS record types, see DNS record types explained and how to monitor MX, SPF, DKIM, and DMARC records.
When your site goes down, your status page becomes the most important page you have. Here's why it matters, what happens when you don't have one, and what a good status page does during a real outage.
Read moreYour domain is resolving, but pointing to the wrong server — showing old content, a previous host's page, or someone else's site entirely. Here's what causes this and how to diagnose it.
Read moreUptime monitoring isn't foolproof. Single-location monitors, wrong health check endpoints, long check intervals, and false positives can all cause real downtime to go undetected. Here's what to watch out for.
Read moreLooking to monitor your website and domains? Join our platform and start today.