HoganHost blog

How To Set Up a CNAME Record Correctly

A single incorrect character in a CNAME record can quietly break email deliverability, disconnect a subdomain, or cause a third-party tool integration to fail without any obvious error message pointing to the cause. CNAME records are simple in concept but easy to get subtly wrong.
Here is what a CNAME record actually does and exactly how to set one up correctly, without the common mistakes that trip up beginners.

What a CNAME Record Actually Does

A CNAME, short for Canonical Name, points one domain or subdomain to another domain name rather than directly to an IP address. Instead of saying “this address lives at this specific IP,” it says “this address is really just another name for that other domain.”
This is commonly used for subdomains. For example, pointing blog.yourbusiness.com.ng to a hosting platform’s own domain, or connecting mail.yourbusiness.com.ng to an email service’s domain, without needing to know or manage the actual underlying IP address directly.

When to Use a CNAME Versus an A Record

An A record points a domain or subdomain directly to a specific IP address. A CNAME points it to another domain name instead, which then resolves to wherever that target domain currently points.
Use a CNAME when a service specifically instructs you to, usually for connecting subdomains to third-party platforms like email marketing tools, landing page builders, or content delivery networks. Use an A record when you have a direct IP address to point to, most commonly for your main domain pointing to your hosting server.
A domain’s root, sometimes written as the “@” record, generally cannot use a CNAME due to DNS protocol restrictions. Root domains almost always need an A record instead.

Setting Up a CNAME Record Step by Step

  1. Log into your domain’s DNS management panel, usually accessible through your registrar or hosting provider’s client area.
  2. Locate the DNS Zone Editor or DNS Management section.
  3. Click to add a new record and select CNAME as the record type.
  4. In the Name or Host field, enter the subdomain you are configuring, such as “blog” or “shop”, without including the full domain.
  5. In the Value, Target, or Points To field, enter the exact domain name provided by the service you are connecting to. This must be typed precisely, including any trailing period if your DNS panel requires one.
  6. Set the TTL, or Time To Live, which controls how long the record is cached. A lower TTL like 300 seconds during initial setup allows faster troubleshooting if something needs adjusting.
  7. Save the record and allow time for DNS propagation, which typically takes anywhere from a few minutes to a few hours.

Common Mistakes That Cause CNAME Problems

Adding “www” or the full domain into the Name field when only the subdomain portion belongs there is one of the most frequent errors, often creating a record that does not resolve correctly.
Leaving a trailing dot off the target value when the DNS panel specifically requires one, or adding one when it is not required, can silently break the record depending on the specific DNS software in use.
Creating a CNAME record for a name that already has other DNS records pointing to it, such as an existing A or MX record for the same subdomain, causes a conflict. DNS rules generally do not allow a CNAME to coexist with other record types on the exact same name.
Forgetting to remove an old CNAME record when migrating a service, leaving two conflicting records pointing in different directions, is another common cleanup mistake.

Verifying the Record Is Working

After saving a CNAME, use a DNS lookup tool to confirm the record has propagated and is returning the correct target value. Most hosting providers and third-party services also offer a verification step once the CNAME is detected correctly, confirming the connection is live.

Getting DNS Management Right

CNAME records are one small piece of a domain’s overall DNS configuration, but a single wrong entry can cause confusing failures that are hard to diagnose without understanding exactly what changed.
HoganHost’s FreeDNS management panel gives full control over CNAME, A, MX, and other record types from one place, with support available for anyone unsure whether a record is configured correctly.
A correctly configured CNAME record is invisible when it works and confusing when it does not. Taking the extra minute to enter the exact target value saves hours of troubleshooting later.

Leave a Comment

Your email address will not be published. Required fields are marked *