Can one DNS name have multiple CNAME records?

A DNS name can have only one CNAME target. Use address records or a provider-supported routing feature when you need multiple destinations.

Best practices
Illustration of application modules working together

No. A single DNS name cannot have CNAME records pointing to different targets. A CNAME declares one name to be an alias of another; DNS does not define a selection policy for several competing canonical names.

The same owner name also cannot hold ordinary data such as A, AAAA, MX, or TXT records alongside a CNAME. DNSSEC-related exceptions do not allow a second CNAME target or remove the restriction at a zone apex.

Two configurations to avoid

These are invalid examples:

www  300  IN CNAME  a.example.net.
www  300  IN CNAME  b.example.net.
www  300  IN CNAME  a.example.net.
www  300  IN MX 10  mail.example.com.

Authoritative software or the DNS provider will usually reject them. If a control panel accepts several entries, check whether they represent routing policies that return one answer at a time. The interface alone does not establish what the authoritative server publishes.

Choose the record structure that fits

Requirement Suitable approach
One hostname needs several IP addresses Publish multiple A or AAAA records.
Several hostnames share one destination Give each hostname its own CNAME to that destination.
A hostname needs web hosting and mail records Use provider-approved A/AAAA records, supported alias flattening, or put the web alias on a separate name.
The zone apex must follow a hosted service Use a supported ALIAS/ANAME or flattening feature, or maintain A/AAAA records.

For example, www.example.com and shop.example.com can both alias service.example.net. The restriction applies to multiple targets at one owner name, not to multiple aliases pointing at the same target.

DNS address rotation provides limited distribution. It does not inherently supply health checks, session persistence, or control over client caches. Use a load balancer or a DNS service with documented health-aware routing when those features matter.

Related constraints

CNAME chains can resolve, but each extra dependency may add queries or another point of failure. Cached records and complete answers can reduce network round trips. Keep chains you control short, and use the exact hostname a hosting provider documents rather than guessing an internal endpoint.

MX and NS targets must not be aliases; SRV also requires a target with address records rather than a CNAME. These are protocol constraints, not merely performance advice.

If the apex cannot use the provider's alias feature, an HTTP redirect service can send users to www. DNS itself cannot return an HTTP 301, and HTTPS access to the apex still requires a valid certificate.

References

Related reading

Get a tailored plan

Contact us

Join the community

Scan with WeChat
to join the community

Try Guance

Start online and pay only for what you use.

Get started

Choose a Guance plan

Code hosting