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.

Domain & DNS Guide

What Is a CNAME Record?

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.

Quick answer

CNAME means β€œcanonical name”

A CNAME record makes one hostname follow another hostname.

Example:

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.

🌐

Host

The subdomain or hostname you are creating, such as www or shop.

➑️

CNAME

The DNS record type that points one hostname to another hostname.

πŸ“

Target

The destination hostname your record follows, such as example.service.com.

What does a CNAME record do?

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.

Simple CNAME example

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

CNAME record vs A record

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.

A record

Points directly to an IPv4 address.

yourbusiness.co.uk β†’ 192.0.2.10

  • Used for website hosting IP addresses.
  • Good when the server IP is known.
  • Common for root domains.

CNAME record

Points to another hostname.

www.yourbusiness.co.uk β†’ yourbusiness.co.uk

  • Used for aliases and third-party platforms.
  • Good when a service gives you a hostname.
  • Common for www and subdomains.

When should you use a CNAME record?

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.

Use a CNAME when...

  • A service gives you a hostname instead of an IP address.
  • You want www to follow your main domain.
  • You are connecting a subdomain to a third-party platform.
  • You want an alias for another hostname.
  • You are setting up a shop, booking tool or portal.
  • You are verifying a service using a DNS hostname.
  • You want the target provider to manage IP changes.
  • Your provider specifically asks for a CNAME.

Common CNAME record uses

www

Website aliases

Make www follow the main domain or another website hostname.

shop

Online stores

Point a shop subdomain to an ecommerce platform.

portal

Customer portals

Connect a login area or app to a separate platform.

verify

Service verification

Prove domain ownership for third-party tools.

Can you use a CNAME on the root domain?

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.

Usually avoid

Do not add a standard CNAME to the root domain unless your DNS provider or platform specifically supports that setup.

Use instead

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 and web hosting

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.

Typical website DNS setup

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.

CNAME records and business email

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.

CNAME records and nameservers

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.

Important warning

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.

How long does a CNAME change take?

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.

Propagation tip

If you have just added a CNAME, check the active DNS zone first, then allow time for propagation before assuming the change has failed.

What happens if a CNAME record is wrong?

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.

Common symptoms

  • Subdomain does not load.
  • Third-party platform says domain is not connected.
  • www version fails but root domain works.
  • Verification record is not detected.
  • SSL does not issue for the subdomain.
  • DNS lookup shows the old target.

What to check

  • Are you editing the active DNS zone?
  • Is the host field correct?
  • Is the CNAME target copied exactly?
  • Has DNS propagation completed?
  • Does the target service know about your domain?
  • Is SSL configured on the destination service?

How to add a CNAME record

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.

Safe CNAME setup process

  1. Check which nameservers are active.
  2. Open the active DNS zone.
  3. Choose CNAME as the record type.
  4. Enter the host, such as www or shop.
  5. Paste the target hostname exactly.
  1. Save the DNS record.
  2. Wait for DNS propagation.
  3. Check the record with DNS Lookup.
  4. Test the connected service.
  5. Check SSL if the hostname loads a website.

Can a CNAME record point to a URL?

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.

Not valid for CNAME

https://example.com/specific-page

Valid CNAME-style target

target.example.com

CNAME records and redirects

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.

CNAME records and SSL certificates

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.

Small business example: setting up www

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.

Small business example: connecting a booking platform

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.

Small business example: customer portal

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.

Common CNAME mistakes

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.

Domain extension guides

Choose the Domain Before Creating Aliases

CNAME records are useful for subdomains and services, but the main domain extension should still match the site’s purpose.

FAQs about CNAME records

What is a CNAME record in simple terms?

A CNAME record is a DNS record that makes one hostname point to another hostname. It is commonly used for www and subdomains.

What is the difference between a CNAME and an A record?

An A record points to an IPv4 address. A CNAME record points to another hostname.

Can a CNAME point to a URL?

No. A CNAME should point to a hostname, not a full URL. Do not include https:// or page paths in a CNAME value.

Can I use a CNAME for the root domain?

Usually not with standard DNS. Some providers offer ALIAS, ANAME or CNAME flattening for similar behaviour at the root domain.

Does a CNAME affect email?

Email delivery is usually controlled by MX records. However, some email services use CNAME records for verification, DKIM or related features.

How long does a CNAME change take?

It depends on DNS caching and TTL settings. Some changes appear quickly, while others take longer to propagate across networks.

DNS setup help

Need help connecting a domain or subdomain?

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.

Step 1

Check active nameservers.

Step 2

Add the CNAME target exactly.

Step 3

Test DNS, service setup and SSL.

Final thoughts

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.