Homeglossary

CNAME record

A CNAME record is a DNS record that makes one hostname an alias of another hostname. Instead of storing an IP address, it directs DNS resolvers to look up the target hostname. It is commonly used for subdomains, hosted services, and environments where a provider may change the underlying IP address.

Connect custom domains to Emergent apps.

What Is a CNAME Record?

A CNAME record is a DNS record that makes one hostname an alias of another. It points to a domain name, not an IP address, so DNS can find the target’s A or AAAA record.

For example, app.example.com can alias customer.hosting-platform.com. Visitors use the alias, while the canonical name is the provider-managed target.

How a CNAME Record Works

DNS resolves the alias before a browser connects to the application.

  1. A visitor requests app.example.com.
  2. A DNS resolver finds the CNAME target, such as customer.hosting-platform.com.
  3. The resolver looks up the target’s A record for IPv4 or AAAA record for IPv6.
  4. The browser connects to the returned IP address while keeping app.example.com in the address bar.

CNAME Record vs. A Record, AAAA Record, and Redirect

A CNAME is a DNS alias, not a website redirect.

MechanismPoints toChanges browser URL?Typical use
CNAMEAnother hostnameNoCustom subdomain for a hosted service
A recordIPv4 addressNoDirect server connection
AAAA recordIPv6 addressNoIPv6 server connection
HTTP redirectA different URLYesSending visitors to another page or domain

Common Uses for CNAME Records

CNAME records help when a service controls the underlying infrastructure.

  • Pointing www or an app subdomain to a managed platform.
  • Connecting SaaS, cloud hosting, or CDN endpoints during app design and development.
  • Adding hostnames for email, analytics, or verification.
  • Aliasing a subdomain to another domain when a provider specifies it.

Benefits of Using a CNAME Record

Aliases separate the public address from the infrastructure behind it.

  • Providers can change target IP addresses without requiring alias updates.
  • Multiple subdomains can use clear, reusable names.
  • DNS management is simpler when platforms supply the target hostname.

CNAME Record Limitations and DNS Rules

DNS rules make record placement important.

  • A CNAME generally cannot share a hostname with A, MX, TXT, or other record types.
  • A standard CNAME cannot be used at the zone apex, such as example.com, because that name needs other DNS records.
  • The alias does not need its own A record, but its target must ultimately resolve to an address.
  • Long CNAME chains add lookup work and can fail if a target is removed or misspelled.

How to Add and Verify a CNAME Record

Your DNS provider’s interface may differ, but the process is consistent.

  1. Get the target hostname from your hosting or software provider.
  2. Create a CNAME using the requested host label, such as app.
  3. Paste the target exactly as provided and select a suitable TTL.
  4. Check that the provider has not appended your domain twice to an unqualified target.
  5. Wait for DNS caching to refresh, then verify the alias with a DNS lookup tool.

CNAME Records for Emergent Custom Domains

Connect custom domains to Emergent apps by adding the CNAME target and verification details supplied for your deployment. When publishing with Emergent’s AI web app builder, use the current domain instructions because the target hostname can vary by hosting configuration.

Start Building
on Emergent today
Start Building