Glossary / CNAME record
CNAME record (DNS alias)
A CNAME record (canonical name) makes one hostname an alias of another. Instead of its own IP address it says, "this host is really that host, look at its records." It is handy when several subdomains should point wherever the main domain points.
Check your site
For example, www.example.com is often set up as a CNAME to example.com. The browser sees the alias, follows it to the main domain, and there it reads the A/AAAA record with the real IP. Change the IP in one place and every alias updates automatically.
CNAME is essential for external services: connecting a CDN, a store, a landing page, or email often requires exactly "create a CNAME to our host." You do not know their IPs, and those can change, so the alias solves it.
The main limit: you cannot put a classic CNAME on the root domain (example.com with no subdomain), because it already carries the SOA and NS records. For the root, use an A record or your provider's special ALIAS/ANAME.
Example
www.example.com. 3600 IN CNAME example.com.
Common mistakes
- Putting a CNAME on the root domain, which breaks the standard and knocks out email and other records.
- Adding a CNAME alongside other records on the same name; a CNAME must be the only record for that host.
- Pointing a CNAME at an IP address; CNAME accepts only a hostname, and an IP needs an A record.
- Forgetting the trailing dot on the target where the provider requires it, so the alias goes to the wrong place.
Related terms
Found problems?
Slow hosting, SSL trouble or frequent downtime? Move to TomisHost: fast hosting with free SSL, daily backups and free migration help.
TomisHost hosting