A CNAME (canonical name) record makes one name an alias of another. Whatever the target name resolves to, the alias resolves to as well.
www.yourdomain.co.uk. 3600 IN CNAME yourdomain.co.uk.
Common uses
wwwas an alias of the bare domain- Connecting a subdomain to a third-party service, such as
shoppointing at a hosted shop platform orstatusat a status page provider - Verification records some services ask for
The rules
- No CNAME at the bare domain. The root (
@) must use A records, because a CNAME can’t coexist with the MX and NS records the root needs. - Nothing else on the same name. A name with a CNAME can’t also have an MX, TXT or A record.
- The target is a name, not an IP address. Use an A record for addresses.
- Mind the trailing dot. Enter the target as the service instructs; a fully qualified target ends with a dot.
Adding a CNAME in DirectAdmin
- Open Account Manager then DNS Management and select your domain.
- Choose Add Record, type CNAME.
- Name: the alias, such as
shop. - Value: the target name, such as
shops.example-platform.com.(with the trailing dot for an external name). - Save.
Checking it
dig shop.yourdomain.co.uk CNAME +short
If a CNAME won’t save, there’s usually already another record with that name. Remove or rename it first.