What is a CNAME record?
A CNAME record — short for Canonical Name record — is a DNS entry that maps one domain name (the alias) to another domain name (the canonical, or "true," name). Rather than pointing directly to an IP address like an A or AAAA record does, a CNAME points to another hostname, which is then resolved separately to its IP address.
CNAME records are most commonly used when you want multiple domain names to resolve to the same destination without duplicating IP address entries across your DNS zone. For example, you might point www.example.com to example.com via a CNAME, so that both addresses reach the same server. If the server IP ever changes, you only need to update the A record on the root domain — all CNAME aliases follow automatically.
How CNAME resolution works
When a browser or DNS resolver looks up a domain that has a CNAME record, it does not get back an IP address directly. Instead, it receives the canonical name the alias points to, and then performs another DNS lookup for that canonical name. This chain continues until the resolver reaches a record with an actual IP address — an A record for IPv4 or an AAAA record for IPv6.
For example, a lookup for www.example.com might return a CNAME pointing to example.com, which then has an A record returning 93.184.216.34. The browser connects to that IP address, and the entire chain is transparent to the end user.
How to use the CNAME lookup tool
Enter any domain or subdomain in the search field and click Lookup. The tool queries DNS in real time and returns any CNAME records configured for that host. CNAME records are most commonly found on subdomains like www, mail, or blog rather than on the root domain itself.
The results show the alias host name, the canonical name it points to, and the TTL value. If no CNAME record is returned, the domain or subdomain likely resolves directly via an A or AAAA record rather than through an alias.
Example CNAME configuration
A typical setup might look like this: the root domain example.com has an A record pointing to the server IP. The subdomain www.example.com has a CNAME pointing to example.com. The subdomain blog.example.com has a CNAME pointing to example.com as well. This means all three hostnames ultimately resolve to the same IP, but only one A record needs updating if the server changes.
Frequently Asked Questions
When should I use a CNAME record instead of an A record?
Use an A record when you want to map a hostname directly to a fixed IP address — typically for your root domain or any host where you control the server IP. Use a CNAME when you want a hostname to be an alias for another hostname. CNAMEs are especially useful for subdomains, for pointing to third-party services (like a CDN or SaaS platform that provides a hostname), and for situations where the underlying IP address may change without notice.
Can a CNAME record point to multiple destinations?
No. A CNAME record maps exactly one alias to exactly one canonical name. You cannot have a single CNAME record pointing to multiple targets simultaneously. However, a domain can have multiple CNAME records for different subdomains, each pointing to their own canonical name.
Can I use a CNAME at the root of my domain?
No — this is one of the key restrictions of CNAME records. The root (or apex) of a domain, such as example.com without any subdomain, cannot be a CNAME. This is because the root domain must be able to host other record types like MX (for email) and NS (for name servers), and DNS rules prohibit a CNAME from coexisting with other record types at the same name. Many DNS providers offer a workaround called ALIAS or ANAME records that behave like CNAMEs at the root but are resolved server-side.
Can MX or NS records point to a CNAME?
No. DNS specifications explicitly prohibit MX and NS records from pointing to a CNAME target. Mail servers and name servers must resolve to a hostname that has its own A or AAAA record — not an alias. Configuring MX or NS records to point to a CNAME can cause email delivery failures and DNS resolution errors.
What are common use cases for CNAME records?
CNAME records are used in several common scenarios. Pointing www.example.com to the root domain example.com is the most widespread use case. They are also used for connecting subdomains to third-party platforms — for instance, pointing shop.example.com to a hosted e-commerce platform, or help.example.com to a hosted support tool. Country or regional domains can also be aliased back to a single canonical domain to simplify management.
Does a CNAME affect website performance?
A CNAME adds one extra DNS lookup step compared to a direct A record, since the resolver must first fetch the CNAME and then resolve the canonical name. In practice, this overhead is negligible — typically just a few milliseconds — and is often absorbed by DNS caching. Once the canonical name's IP is cached, subsequent lookups skip the chain entirely until the TTL expires.