Beep beep... Loading...
A CNAME (Canonical Name) record is like a nickname for your website. It's a way to say "this domain name is an alias for that domain name." Think of it as mail forwarding - when someone tries to reach the alias, they're automatically sent to the real address.
Real-world example:
# Making 'www' point to your main domain www.example.com → example.com # Making a blog subdomain point to your hosting platform blog.example.com → example.ghost.io # Setting up a custom domain for your shop shop.example.com → example.myshopify.com
Imagine you have three different phone numbers:
Instead of giving everyone all three numbers, you can set up your work and home phones to automatically forward calls to your cell phone. This is exactly what a CNAME record does - it forwards visitors from one domain name to another.
Point 'www' to your main domain:
www.example.com → example.com
Connect your custom domain to a service like Medium or Shopify:
blog.example.com → example.medium.com
Point your media subdomain to a CDN for faster image loading:
images.example.com → example.cloudfront.net
If you use a CNAME, you can't have other records (like MX for email) on the same domain name. This is why you can't use a CNAME on your root domain (example.com).
Each CNAME adds a small delay. Try to point directly to the final destination rather than creating a chain of CNAMEs (like a chain of mail forwards).
Never use a CNAME for your main domain (example.com). Use an A record instead.
Avoid pointing CNAMEs to other CNAMEs multiple times. This creates unnecessary delays.
When setting up a CNAME, always use the complete domain name (blog.example.com), not just the subdomain part (blog).
Make sure the domain you're pointing to actually exists and is working before setting up the CNAME.
DNS changes can take up to 48 hours to fully propagate (spread across the internet), though usually it's much faster.