Setting Up CNAME Records for Subdomains

Setting Up CNAME Records for Subdomains

A CNAME (Canonical Name) record maps one domain name to another. It is commonly used to point a subdomain to a third-party service, such as shop.yourdomain.com pointing to your Shopify store, or mail.yourdomain.com pointing to Google Workspace.

When to Use a CNAME Record

  • Pointing a subdomain to an external service (Shopify, Squarespace, HubSpot, etc.)
  • Creating a www alias that points to the root domain
  • Verifying domain ownership with a third-party service

Adding a CNAME Record in KPanel

  1. Log in to KPanel at kpanel.kapsulecloud.com
  2. Go to Domains and select your domain
  3. Click DNS Records
  4. Click Add Record
  5. Set the type to CNAME
  6. Enter the subdomain in the Name field (for example, shop for shop.yourdomain.com)
  7. Enter the target domain in the Value field (for example, shops.myshopify.com)
  8. Click Save

CNAME vs A Record

Use CaseRecord Type
Pointing to an IP addressA record
Pointing to another domain nameCNAME

If a third-party service gives you an IP address, use an A record. If they give you a domain name, use a CNAME.

The www Subdomain

Many websites point www.yourdomain.com to the same place as yourdomain.com. This can be done with a CNAME:

TypeNameValue
CNAMEwwwyourdomain.com

When you add a domain to a website in KPanel, the www CNAME is created automatically. You only need to add it manually if you are managing DNS at an external provider.

CNAME Restrictions

There are a few technical limitations to be aware of:

  • You cannot use a CNAME for the root domain (the bare @ or yourdomain.com). Use an A record for this.
  • You cannot have a CNAME alongside other record types (such as MX or TXT) for the same name.

Checking Propagation

After adding a CNAME, it can take up to a few hours to propagate worldwide. To check the current value, visit dnschecker.org, enter your subdomain, and select CNAME as the record type.

Was this article helpful?

Still need help?

Our support team is here on business days, NZT.

Back to Help Centre