A CNAME record (short for canonical name record) is an entry in your domain’s DNS that points one name at another name, rather than at a server’s numeric address. It says, in effect, “this address is an alias; go and look up that one instead”.
How a CNAME record works
Say your online shop runs on Shopify and you want it at www.yourshop.co.uk. You add a CNAME record for www pointing at the hostname Shopify gives you. When a visitor types your address, their device asks DNS where www lives, is told it is an alias for Shopify’s hostname, then looks that name up to find the actual server. The extra step takes a fraction of a second.
The advantage is that you never need to know the platform’s server addresses. If Shopify, Squarespace or your CDN moves its servers, it updates its own records and your CNAME keeps working. An A record, by contrast, holds a fixed IP address that you must change yourself whenever the server changes.
Two rules catch people out:
- No CNAME at the root. The bare domain (yourshop.co.uk with nothing in front) cannot be a standard CNAME, because it must also hold the domain’s SOA and NS records, and usually MX records for email. Some DNS providers offer a workaround called CNAME flattening, or an ALIAS record, which behaves similarly.
- A CNAME stands alone. A name with a CNAME cannot hold any other record type, so you cannot add a TXT or MX record alongside it on the same name.
Beyond websites, CNAMEs often connect custom tracking domains for email marketing tools, and some email services, including Microsoft 365, use them to publish DKIM keys that prove your messages are genuine.
Why it matters
DNS changes are usually the riskiest five minutes of a website launch or platform move. A CNAME pointing at the wrong place, or a typo in the target, can take the site or your email offline, and because DNS answers are stored for a period set by the TTL, fixing the mistake does not take effect immediately everywhere.
Forgotten CNAMEs are a security issue too. If a subdomain such as offers.yourbusiness.co.uk still points at a landing page service you cancelled years ago, someone else can sometimes claim that account and publish their own content on your subdomain. This is called a subdomain takeover, and it trades on your brand’s name.
Common mistakes
- Trying to put a CNAME on the root domain and breaking email in the process.
- Typing “https://” or a page path into the target field; a CNAME target is a bare hostname only.
- Editing DNS at the registrar when the nameservers point to Cloudflare or a host, so the changes are silently ignored.
- Making changes without lowering the TTL first, then waiting hours for a mistake to clear.
- Leaving CNAMEs in place for tools and campaigns that ended long ago.
How to act on it
First, find out where your DNS is actually managed by checking which nameservers the domain uses. Before any change, export or screenshot the full list of records, so you can put things back if needed.
If you are planning a move, lower the TTL on the records involved a day ahead, make the change, then check it with a DNS lookup tool rather than just your own browser. Once a year, review every subdomain and delete CNAMEs that point at services you no longer pay for.
DNS is where a platform switch most often goes wrong, so I plan and check these records as part of website migration SEO, alongside redirects and tracking.
