CNAME record

A DNS record that maps a hostname to another hostname. The standard way to delegate a custom domain to a SaaS edge.

A CNAME (canonical name) record says "this hostname is an alias for another hostname." When a resolver looks up the alias, it gets pointed at the canonical name and follows that to an A or AAAA record.

shop.acme.com.   CNAME   edge.yourapp.com.

This is the workhorse of custom-domain SaaS: customers add one CNAME pointing their hostname at your edge, and traffic starts flowing.

Two important limits

No co-existence with other records. A hostname that has a CNAME cannot also have a TXT record, an MX record, anything. This breaks email if customers try to put a CNAME at acme.com (which would override the MX records).

Not allowed at the apex. example.com CNAME edge.yourapp.com is illegal per RFC 1034 because the apex must have an SOA record and a CNAME can't coexist with anything. See apex domain and CNAME flattening.

CNAME vs A record for SaaS custom domains

Always prefer CNAMEs. Reasons:

  1. You can change your edge IPs without breaking customers. A CNAME to edge.yourapp.com survives any IP change you make. An A record to a specific IP doesn't.
  2. Customers find it less scary. "Set this CNAME" is more familiar than "set these four A records."
  3. You can update behavior server-side. Need to add a CDN in front of your edge? Update edge.yourapp.com's A records. Every customer benefits automatically.

TTL on CNAMEs

Keep CNAME TTLs low (300–3600 seconds) for SaaS-hosted records so changes propagate fast. The hostname your CNAME points TO can have a longer TTL since it changes less often.

Want this handled for you? Start free with Domainee — 50 custom domains + 100 GB bandwidth, no card.