All Glossary Terms

Glossary

CNAME Record

Creates an alias from one domain name to another

A CNAME record (Canonical Name record) creates an alias that points one domain name to another domain name, allowing multiple hostnames to resolve to the same underlying IP address without duplicating A records.

What is a CNAME Record?

A CNAME record, short for Canonical Name record, is a DNS record that maps one domain name to another domain name rather than directly to an IP address. The target of a CNAME is another hostname — called the canonical name — which is then resolved normally to find the actual IP address. For example, www.example.com might have a CNAME pointing to example.com, so both addresses lead to the same server.

CNAME records are widely used for subdomains, CDN integrations, third-party services, and simplifying DNS management. If you use a SaaS platform that hosts your blog, they might ask you to create a CNAME for blog.example.com pointing to their domain. When their IP address changes, only their DNS records need updating — your CNAME continues to work without modification.

An important restriction is that a CNAME cannot coexist with other record types for the same hostname, and it cannot be used at the zone apex (the root domain itself, like example.com). For the root domain, some DNS providers offer proprietary workarounds such as ALIAS or ANAME records.

How Does a CNAME Record Work?

When a resolver receives a query for a hostname that has a CNAME record, it does not immediately return an IP address. Instead, it follows the chain: it reads the CNAME target, then performs a new DNS lookup for that target. This process continues until it reaches a record type that resolves to an IP address, such as an A or AAAA record.

For example, if www.example.com is a CNAME pointing to example.com, and example.com has an A record pointing to 93.184.216.34, the resolver returns 93.184.216.34 to the client. The client connects to that IP, and the CNAME is transparent to the user.

CNAME chains — where a CNAME points to another CNAME — are technically allowed but should be minimized. Each hop in the chain requires an additional DNS lookup, adding latency. Best practice is to keep chains short and always terminate them at an A or AAAA record.

How to Check a CNAME Record

You can look up CNAME records for any subdomain using the CNAME Lookup tool at nslookup.net/tools/cname-lookup. Enter the full subdomain (for example, www.yourdomain.com) and the tool will show you the CNAME target and the final resolved IP address. This is particularly useful when setting up a new service integration, diagnosing redirect loops, or verifying that a CNAME change has propagated correctly across DNS servers.

Related Tool

CNAME Lookup

Try the Tool →

Frequently Asked Questions

What is the difference between a CNAME and an A record?
An A record maps a domain directly to an IPv4 address, while a CNAME maps a domain to another domain name. A records are used when you need to point a hostname to a specific IP. CNAMEs are used when you want one hostname to follow another hostname, making management easier when IP addresses change.
Can I use a CNAME at the root of my domain?
No, the DNS specification (RFC 1034) prohibits placing a CNAME at the zone apex because other record types like SOA and NS must exist at the root. Some DNS providers offer proprietary solutions called ALIAS or ANAME records that behave like CNAMEs at the root by internally resolving to an IP. These are non-standard but widely supported.
Can a CNAME point to another CNAME?
Yes, but it is discouraged. Each CNAME in a chain requires an extra DNS lookup, which adds latency and the risk of a loop. Most DNS resolvers will follow a limited number of hops before giving up with a resolution error. Keeping CNAME chains to a single hop is considered best practice.
Why would a third-party service ask me to create a CNAME?
Third-party services like CDNs, email providers, and SaaS platforms ask for CNAMEs because it allows them to manage their own infrastructure without requiring you to update your DNS every time they change their IP addresses. By pointing your subdomain to their hostname, they retain control over where traffic is ultimately sent.