CNAME Flattening, Explained

KB-2.9 · 5 min · Updated October 2026

CNAME flattening lets you point a name at another hostname in places where a normal CNAME record isn’t allowed, most often your root domain ( example.com , with nothing in front of it). Instead of answering with the target hostname, NameBright looks up that hostname itself and answers with the IP addresses it finds. Anyone looking up your domain gets A records, the same as if you’d entered the IP addresses by hand.

How a standard CNAME answer works

When someone looks up www.example.com and it has a standard CNAME record, NameBright’s nameservers answer with the target hostname, such as sites.yourplatform.net . The visitor’s resolver then makes a second lookup for that hostname to get an IP address. The CNAME itself never contains an address.

How a flattened answer is different

With flattening, NameBright does that second lookup on its own side. It resolves the target hostname to its current IP addresses and returns those addresses directly, under your name, as A records (and AAAA records for IPv6). The resolver asking about example.com never sees the CNAME or the target hostname.

Standard CNAME Flattened CNAME
What a lookup returns The target hostname The target’s IP addresses, as A records
Second lookup needed Yes No
Allowed on the root domain No Yes
Can share its name with MX and TXT records No Yes
What a CNAME query shows The CNAME record Nothing

Why the root domain needs it

DNS rules don’t allow a CNAME on the root of a domain. The root has to hold the domain’s NS and SOA records, and a name with a CNAME can’t hold any other record. That’s a problem for the many hosting platforms, CDNs, and load balancers that give you a hostname to point at rather than a fixed IP address, because their IP addresses can change without notice. Flattening lets you point the root domain at the hostname, so NameBright follows the provider’s IP changes for you.

Where NameBright applies it

NameBright flattens a CNAME record in two places:

  • On the root domain.

    A CNAME added with the subdomain left blank (or entered as

    @

    ) is answered as a flattened record.

  • On a wildcard.

    A CNAME on

    *

    , which covers every subdomain that doesn’t have a record of its own, is also flattened.

A CNAME on any named subdomain, such as www or shop , is answered as a standard CNAME. Flattening happens automatically, and there’s no setting to turn it on or off.

Flattening only applies while your domain uses NameBright’s default nameservers. If it points at custom nameservers, your other DNS provider decides how root and wildcard CNAMEs work (see Custom Nameservers vs. NameBright’s Default Nameservers).

Setting it up

There’s no separate record type for flattening. You add an ordinary CNAME record (see Add, Edit, and Delete a CNAME Record), with three things to watch:

  1. Leave the subdomain blank for the root domain, or enter

    *

    for a wildcard.

  2. Enter only the hostname your provider gave you, such as

    sites.yourplatform.net

    , with no

    https://

    and no path.

  3. Delete any A or AAAA records already on that name first, so the old addresses don’t conflict with the flattened ones.

Common uses

  • Pointing your root domain at a website platform that gives you a hostname instead of an IP address.

  • Putting your root domain behind a CDN or a cloud load balancer.

  • Sending every subdomain to one platform with a wildcard, for services that create a subdomain per customer or per landing page.

Limitations

  • Some providers’ verification checks can fail.

    A platform that checks specifically for a CNAME record on your root domain, before activating it or issuing an SSL certificate, won’t find one, because the answer is A records. Traffic still routes correctly. Ask the provider whether it accepts an A record or a TXT verification record instead.

  • CDN location routing is less precise.

    CDNs pick the closest server based on who is asking. With flattening, NameBright’s servers do the asking, so the CDN may choose a server near NameBright rather than near your visitor. Most sites won’t notice. If response time matters a lot, put your site on

    www

    with a standard CNAME and forward the root domain to it (see Set Up URL Forwarding).

  • IP address changes aren’t instant.

    NameBright refreshes the target’s addresses periodically, and resolvers then cache the answer for your record’s TTL. After your provider changes its IP addresses, allow for both before expecting every visitor to reach the new ones.

  • Your root domain depends on the target.

    If the target hostname is misspelled, deleted, or has no IP address, your root domain stops resolving too.

Troubleshooting

A CNAME lookup on your root domain returns nothing. That’s expected. Look up the A record instead and compare it with the target’s:

dig example.com A +short dig sites.yourplatform.net A +short

If both return the same addresses, flattening is working. Small differences can be normal for a CDN that rotates addresses.

The root domain doesn’t resolve at all. Check, in this order: the target hostname is spelled correctly and resolves on its own; no leftover A or AAAA records sit on the same name; the domain uses NameBright’s default nameservers; and enough time has passed for the old answer to expire (see Why DNS Changes Take Time to Go Live).

The domain resolves but shows the wrong site or a certificate error. DNS is doing its job. The provider hasn’t finished adding your root domain on its side, or hasn’t issued its SSL certificate yet. Check the custom-domain settings in your provider’s dashboard.

Email stopped working after you added the record. Check that your MX and TXT records are still on the root domain.

Related