CNAME Record
Definition
CNAME is short for canonical name, and it means "this name is really that name". The value must be a hostname, written in full and often with a trailing dot, and a resolver that meets one abandons the original question and starts again at the target. The record comes with one firm restriction: a name holding a CNAME may hold no other record of any type. That rules it out at the apex, where the zone's own SOA and NS records already live, and it rules out sitting beside an existing TXT or MX record on the same host. Chains are permitted, so a CNAME may point at another CNAME, but each extra hop is another lookup and another few milliseconds.
Why It Matters
This is the record almost every host asks for when you connect a custom domain, and the reason is division of labour. The host owns the target name, so it can move addresses, add edge locations, replace hardware and renew certificates without ever asking you to edit anything. You own the record, so you can move to a different host in one line. The cost is the extra resolution step and the apex restriction, which is a genuine annoyance rather than a theoretical one. For any name that is not the bare domain, a CNAME is usually the correct and dullest answer.
How It Works
You add a record with the host set to the label you want — 'files', 'pitch', 'www' — the type set to CNAME, and the value set to the target hostname the platform gave you. A resolver asked for files.acme.com receives the CNAME, then resolves the target down to an A record and returns both to the client. The browser opens the connection to that address but still sends files.acme.com in the TLS handshake and the HTTP Host header, which is exactly how the host knows whose content to serve. Each record in the chain is cached separately for its own TTL, so the target's short lifetime can keep your longer-lived record pointing at a moving destination.
Real-World Example
A consultancy publishes a 6 MB rate card on 99helpers and wants it at rates.hart.co.uk instead of the free platform address. They add the domain in the dashboard, copy the target hostname it shows, and create one CNAME on the host 'rates'. Within a few minutes the rate card answers at their own name, with a certificate issued automatically and the download analytics unchanged. When 99helpers later shifts the file to a different edge address, nothing in their zone needs editing.
Common Mistakes
- ✕Putting a CNAME on the bare domain — well-behaved providers reject it, and the ones that accept it break your mail by masking the MX records
- ✕Adding a CNAME to a host that already has an A or TXT record — the zone becomes invalid and resolvers answer inconsistently
- ✕Omitting the trailing dot where the provider expects one — the zone appends your own domain and the target silently becomes something like edge.example.net.acme.com
Related Terms
Apex Domain
The apex domain is the bare name with nothing in front of it — acme.com rather than www.acme.com. It is also called the root domain, the naked domain or the zone apex.
A Record
An A record maps a name straight to an IPv4 address. It is the simplest record there is, and the only standard way to put a destination at the bare version of a domain.
Custom Domain
A custom domain is a name you own, pointed at content somebody else hosts, so visitors see files.acme.com instead of the provider's address. You keep the registration; the provider keeps the servers.
DNS Record
A DNS record is one entry in a domain's zone: a host, a type, a value and a TTL. The type decides what the value is allowed to mean.
Static Hosting
Static hosting is a service that stores a folder of finished web files and serves them over HTTP, without running any application code of yours. You upload the folder; the host answers requests for the files in it.
Put a file online in seconds
Drop in a document, an image, a page or a whole static website and share the link — free, with no build step and no server to set up.
Host a file free →