Skip to content
Dashboard

CNAME vs. A record: The complete guide to DNS records for your domain

Link to headingWhat is a CNAME record?

Link to headingWhat is an A record?

Link to headingHow CNAME and A records differ

Link to headingHow each record resolves

DNS lookup
example.com → 203.0.113.10 (1 lookup, done)

DNS lookup
www.example.com → loadbalancer.provider.com (lookup 1)
loadbalancer.provider.com → 203.0.113.42 (lookup 2, done)

Link to headingDNS lookup speed and caching

Link to headingRoot domain restrictions

Link to headingMaintenance and IP changes

Link to headingCompatibility with other DNS records

Link to headingWhen to use a CNAME record

Link to headingWhen to use an A record

Link to headingAAAA and ALIAS records as alternatives

Link to headingConfiguring CNAME and A records on Vercel

Link to headingAdding a CNAME record for subdomains

Link to headingAdding an A record for root domains

Terminal
dig a example.com
dig cname www.example.com

Link to headingGet your custom domain live on Vercel with the right DNS records

Link to headingFrequently asked questions about CNAME vs A record

Link to headingCan you use a CNAME record for a root domain?

Link to headingWhich is faster, a CNAME or an A record?

Link to headingDo CNAME records affect SEO?

Link to headingWhen should you use an ALIAS record instead?

Ready to deploy?