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 www, subdomains, third-party services, website builders, email tools and verification systems.
Unlike an A record, which points directly to an IP address, a CNAME points to another domain name. This makes it useful when a service gives you a hostname instead of a fixed server IP.
This guide explains what a CNAME record is, how it works, when to use one, how it compares with an A record, and what to check before editing DNS.
A CNAME record makes one hostname follow another hostname.
www.yourbusiness.co.uk can point to yourbusiness.co.uk.
If the target hostname changes behind the scenes, the CNAME can keep working because it follows the target name rather than a fixed IP address.
The subdomain or hostname you are creating, such as www or shop.
The DNS record type that points one hostname to another hostname.
The destination hostname your record follows, such as example.service.com.
A CNAME record creates an alias from one hostname to another hostname. Instead of pointing directly to an IP address, it tells DNS to follow another name and use the records found there.
For example, you might want www.yourbusiness.co.uk to point to yourbusiness.co.uk. A CNAME record can make the www version follow the main domain.
CNAME records are also commonly used by third-party platforms. If a website builder, booking system, customer portal or marketing tool gives you a target such as custom.serviceprovider.com, you may need to create a CNAME record for your chosen subdomain.
The left side is the name you want to use. The right side is the name it should follow.
| Host / Name | Type | Target / Value |
|---|---|---|
www |
CNAME | yourbusiness.co.uk |
shop |
CNAME | shops.exampleplatform.com |
booking |
CNAME | yourname.bookingservice.com |
A CNAME record and an A record are both used to point domain names, but they work differently. An A record points to an IPv4 address. A CNAME record points to another hostname.
If your hosting provider gives you an IP address, you usually use an A record. If a platform gives you a hostname, you usually use a CNAME record.
This difference is important when connecting domains to hosting, website builders, landing page tools, ecommerce platforms and other online services.
Points directly to an IPv4 address.
yourbusiness.co.uk β 192.0.2.10
Points to another hostname.
www.yourbusiness.co.uk β yourbusiness.co.uk
www and subdomains.You should use a CNAME record when you want one hostname to follow another hostname. This is common when the destination service manages its own IP addresses and does not want you to point directly to one fixed IP.
For example, a third-party service might ask you to point booking.yourbusiness.co.uk to yourbusiness.bookingservice.com. The service can then manage the underlying server IPs itself, while your subdomain continues to point to the correct place.
CNAME records are especially useful for subdomains because they make DNS easier to manage when services change their infrastructure behind the scenes.
www to follow your main domain.
Make www follow the main domain or another website hostname.
Point a shop subdomain to an ecommerce platform.
Connect a login area or app to a separate platform.
Prove domain ownership for third-party tools.
In standard DNS, CNAME records are usually not used on the root domain, also called the apex domain. The root domain is the main domain itself, such as yourbusiness.co.uk.
This is because the root domain often needs other important records, such as MX records for email and TXT records for verification or email authentication. A CNAME at the root can conflict with those records.
Some DNS providers offer special features such as ALIAS, ANAME or CNAME flattening to create similar behaviour at the root domain. These are provider-specific features, not standard CNAME records.
Do not add a standard CNAME to the root domain unless your DNS provider or platform specifically supports that setup.
Use an A record for the root domain when you have an IP address, or follow your providerβs ALIAS, ANAME or flattening instructions if offered.
CNAME records are often used alongside web hosting, especially for the www version of a website. The main domain might use an A record, while www uses a CNAME to follow the main domain.
For example, yourbusiness.co.uk could point to your hosting server using an A record, while www.yourbusiness.co.uk points to yourbusiness.co.uk using a CNAME.
If you are setting up a new website, compare our UK Web Hosting, WordPress Hosting and Small Business Hosting options.
| Host | Type | Value | Purpose |
|---|---|---|---|
@ |
A | 192.0.2.10 |
Main domain points to the web hosting server. |
www |
CNAME | yourbusiness.co.uk |
www follows the main domain. |
mail |
A or CNAME | Depends on email setup. | May be used for mail server access. |
Email delivery is usually controlled by MX records, not CNAME records. However, CNAME records can still be part of an email setup. Some email providers use CNAME records for DKIM, tracking, verification or service-specific hostnames.
If your email provider gives you CNAME records, add them exactly as instructed. Small mistakes in the hostname or target can stop verification or authentication from working.
If you need professional email using your own domain, visit our Business Email Hosting page. You can also use DNS Lookup to check whether records are visible.
Like all DNS records, CNAME records must be edited wherever the active nameservers point. If you edit a CNAME record in the wrong DNS panel, the live domain will not change.
This is one of the most common DNS mistakes. A domain may be registered with one provider but using nameservers from another provider. In that case, DNS changes need to be made at the active nameserver provider.
Before adding or changing a CNAME record, check the current nameservers and make sure you are editing the correct DNS zone.
If your CNAME change is not working, check whether you edited DNS in the right place. The active nameservers decide which DNS records are live.
CNAME changes can take time to update across the internet because DNS records are cached. This delay is known as DNS propagation.
Some networks may show the new CNAME quickly, while others may keep using older cached information for a while. This is normal after DNS changes.
You can use our DNS Propagation Checker to monitor changes and our DNS Lookup tool to inspect current DNS records.
If you have just added a CNAME, check the active DNS zone first, then allow time for propagation before assuming the change has failed.
If a CNAME record is wrong, the hostname may not resolve correctly. This can cause a subdomain to fail, a third-party platform to show an error, or a verification process to fail.
Sometimes the CNAME itself is correct, but the target platform has not been configured to accept your domain. In that case, DNS may be pointing correctly, but the service still needs your custom domain added inside its own settings.
When troubleshooting, check both the DNS record and the destination service.
www version fails but root domain works.The exact steps depend on your DNS provider, but the process is usually similar. You open the DNS zone for your domain, add a new record, choose CNAME as the type, enter the host, then enter the target hostname provided by your service.
Be careful when copying the target. Some providers require a trailing dot at the end of the hostname, while others add it automatically. Follow the instructions given by your DNS provider or the service you are connecting.
After saving the record, allow time for DNS propagation and then test the subdomain or service.
www or shop.No. A CNAME record points to a hostname, not a full URL. This is an important difference.
For example, a CNAME value should look like target.example.com, not https://target.example.com/page. DNS does not understand paths, pages, query strings or protocols such as https:// inside a CNAME value.
If you need to send visitors from one full URL to another, you usually need a redirect, not a CNAME record.
https://example.com/specific-page
target.example.com
A CNAME record is not the same as a redirect. A CNAME controls DNS resolution. A redirect tells a browser to move from one URL to another after the browser has reached a web server.
For example, if you want www.yourbusiness.co.uk to behave as an alias for your main domain, a CNAME may be part of the setup. But if you want oldpage.html to send visitors to newpage.html, that is a redirect.
DNS records work before the website loads. Redirects happen after the browser contacts a web server.
If a CNAME points a subdomain to a website or third-party service, SSL still needs to be configured for that hostname. DNS pointing alone does not guarantee HTTPS will work.
For example, if shop.yourbusiness.co.uk points to an ecommerce platform, that platform needs to support SSL for your custom subdomain. Otherwise, visitors may see a certificate warning.
After adding a CNAME for a website or platform, use our SSL Checker to confirm the certificate is working correctly.
A small business wants both yourbusiness.co.uk and www.yourbusiness.co.uk to load the same website. The root domain uses an A record pointing to the hosting server, and www uses a CNAME pointing to the root domain.
This setup keeps the www version easy to manage. If the main domain changes hosting later, the www record can continue following the root domain.
A salon wants customers to book appointments at booking.salonname.co.uk. The booking platform provides a target hostname such as salonname.bookingplatform.com.
The business adds a CNAME record for booking pointing to the platform hostname. The booking platform also needs the custom domain added inside its settings before everything works properly.
A company uses a separate customer portal and wants it available at portal.companyname.co.uk. The portal provider gives a CNAME target.
The business creates the CNAME record and checks SSL once the portal is connected. Email records are left untouched because the CNAME only affects the portal subdomain.
One common mistake is trying to enter a full URL as the CNAME target. CNAME records need hostnames, not URLs with https:// or page paths.
Another mistake is editing DNS in the wrong place. If your domain uses nameservers from one provider, changes made in another providerβs DNS panel may not affect the live domain.
It is also common to add a CNAME correctly but forget to configure the destination platform. Many services require you to add the custom domain inside their dashboard before the CNAME works fully.
CNAME records are useful for subdomains and services, but the main domain extension should still match the siteβs purpose.
A CNAME record is a DNS record that makes one hostname point to another hostname. It is commonly used for www and subdomains.
An A record points to an IPv4 address. A CNAME record points to another hostname.
No. A CNAME should point to a hostname, not a full URL. Do not include https:// or page paths in a CNAME value.
Usually not with standard DNS. Some providers offer ALIAS, ANAME or CNAME flattening for similar behaviour at the root domain.
Email delivery is usually controlled by MX records. However, some email services use CNAME records for verification, DKIM or related features.
It depends on DNS caching and TTL settings. Some changes appear quickly, while others take longer to propagate across networks.
If you are setting up a website, compare our UK Web Hosting, WordPress Hosting and Small Business Hosting options.
Need a domain first? Visit our Domain Services. If you also need professional email, explore Business Email Hosting.
Not sure where to begin? Visit Start Here and choose the right setup for your domain, website and email.
Check active nameservers.
Add the CNAME target exactly.
Test DNS, service setup and SSL.
A CNAME record is a DNS record that points one hostname to another hostname. It is commonly used for www, subdomains and third-party services that provide a target hostname.
The key difference is that a CNAME points to a name, while an A record points to an IP address. Use the record type your hosting provider or service specifically asks for.
Before adding a CNAME, check your active nameservers, copy the target exactly, avoid using full URLs, and test the connected service after DNS propagation.