Domains

What Is a CNAME Record?

Learn what CNAME records are, how they create aliases for domain names and when to use them for websites, tools and services.

A CNAME record is a DNS record that points one hostname to another hostname. It is commonly used for subdomains such as www, shop, support or app.

CNAME records are useful because they let one DNS name follow another instead of pointing directly to an IP address.

Quick answer

A CNAME record points one hostname to another hostname. It is often used for subdomains such as www.example.co.uk pointing to example.co.uk or to a third-party service.

How a CNAME record works

Instead of saying β€œthis hostname points to this IP address”, a CNAME says β€œthis hostname points to that hostname”. DNS then follows the target hostname to find the final destination.

This is helpful when the destination may change IP addresses, because you only need to follow the provider's hostname rather than updating IP addresses manually.

Common uses for CNAME records

CNAME vs A record

An A record points to an IP address. A CNAME points to another hostname. If your provider gives you an IP address, they usually want an A record. If they give you a hostname, they may want a CNAME.

Following the provider's exact instructions matters because the wrong record type can stop a service from working.

Can the root domain use a CNAME?

In traditional DNS, the root domain usually should not use a normal CNAME because it can conflict with other required records. Some DNS providers offer special flattened CNAME or ALIAS-style records, but these depend on the provider.

For most basic hosting setups, the root domain uses an A record and subdomains can use CNAME records.

How CNAME records affect website setup

CNAME records are often used when connecting a subdomain to a service that manages infrastructure behind the scenes. For example, a provider may ask you to point app.yourdomain.co.uk to a platform hostname.

This lets the provider change their own IP addresses without asking you to update your DNS each time.

Common CNAME mistakes

Need help choosing the right setup?

If you are not sure which option is right for your website, start with our Start Here page or compare our UK Web Hosting services.

You can also explore VPS Hosting UK and VDS Hosting UK if your website needs more control, dedicated resources or room to grow. If you are connecting a subdomain, check whether the service asks for an A record or a CNAME record.

Final thoughts

CNAME records are useful for pointing subdomains to other hostnames. They are common in modern website setups, but they need to be used in the right place and with the correct target.