On this page
Definition
A CNAME record is a DNS record that makes one hostname act as an alias for another hostname. Instead of pointing directly to an IP address, it points to another domain name that should be followed to find the final destination.
CNAME records are most commonly used for subdomains, such as www, staging, shop, app or provider-specific verification hosts. They are useful, but they must be configured carefully because a wrong CNAME can break a website, affect SSL validation or interfere with other DNS records.
Key Takeaways
- A CNAME record points one hostname to another hostname, not directly to an IP address.
- CNAME records are usually used for subdomains, third-party platforms, CDN services, staging sites and verification records.
- A CNAME cannot normally be used at the root of a domain, and it should not share the same hostname with other DNS record types.
Plain English Explanation
What Does a CNAME Record Actually Do?
Simple CNAME Record Example
This is a simplified example of a CNAME record for a www hostname. The exact format varies between DNS providers, but the meaning is the same.
Type: CNAME
Name: www
Value: example.com
TTL: 3600
In this example, www.example.com is an alias of example.com.
How It Works
How DNS Resolves a CNAME Record
A CNAME lookup adds one extra step to the DNS process because DNS must follow the alias before finding the final destination.
-
A visitor requests a hostname
A browser, app or mail system asks DNS where a hostname should go, such as www.example.com.
-
DNS finds the CNAME record
The DNS response says that www.example.com is an alias of another hostname, such as example.com or a provider-managed hostname.
-
DNS resolves the target hostname
The resolver then looks up the target hostname’s final records, such as A or AAAA records, and returns the destination needed to complete the connection.
Common Uses
When Should a CNAME Record Be Used?
CNAME Record vs A Record
CNAME and A records both help direct internet traffic, but they do different jobs. Choosing the wrong one can make a service fail or create difficult troubleshooting issues.
| Feature | CNAME Record | A Record |
|---|---|---|
| Points to | Another hostname, such as hosting.provider.example | An IPv4 address, such as 203.0.113.10 |
| Best used for | Subdomains, provider-managed services and aliases that may change destination | Root domains, fixed server destinations and direct hosting connections |
| Main limitation | Cannot usually be used at the domain root and cannot normally share a hostname with other records | Needs updating if the server IP address changes |
Do Not Treat a CNAME as a Universal DNS Fix
Common CNAME Record Mistakes
Most CNAME problems come from using the record in the wrong place, copying provider instructions without checking the existing DNS zone, or assuming DNS only affects the website.
Adding a CNAME where other records already exist
Do this instead
A hostname with a CNAME record should not normally have other record types attached to it. Check for existing A, TXT, MX or verification records before adding the CNAME.
Using a CNAME at the root domain without checking provider support
Do this instead
Standard DNS does not allow a normal CNAME at the zone apex because the root must also hold records such as NS and SOA. Use the method recommended by your DNS provider, such as A records, flattening or an ALIAS-style record where supported.
Creating long CNAME chains
Do this instead
Avoid pointing one CNAME to another CNAME if a more direct target is available. Chains can make troubleshooting harder and may add unnecessary lookup steps.
Troubleshooting CNAME Problems
If a website, subdomain or external platform stops working after a DNS change, the CNAME record is one of the first items to check.
The subdomain does not load
Likely cause
The CNAME may point to the wrong target, the target hostname may not resolve, or DNS propagation may not have completed.
Solution
Confirm the exact target supplied by the provider, check for spelling errors and allow for propagation. If the service is business-critical, review the full DNS zone before making further changes.
SSL or HTTPS errors appear
Likely cause
The CNAME may point to a service that does not have a valid SSL certificate for your hostname, or the provider may not have completed domain validation.
Solution
Check that the destination platform supports your custom hostname and that SSL validation records have been added correctly.
Email authentication or verification fails
Likely cause
A CNAME may have been added to the wrong hostname, or it may conflict with an existing TXT, DKIM or verification record.
Solution
Compare the provider’s instructions against the current DNS zone. Do not remove existing email records unless you understand what service uses them.
Business Impact
How CNAME Records Affect Websites, Email, SSL and SEO
CNAME Record Review Checklist
Before adding or changing a CNAME record, review the surrounding DNS configuration. This helps reduce the risk of avoidable downtime during a launch, migration or platform setup.
-
Confirm the exact hostname and target
Check whether the provider wants the full hostname, such as www.example.com, or only the host label, such as www. Also confirm whether the target needs a trailing dot in your DNS provider’s interface.
-
Check for existing records on the same hostname
Look for A, AAAA, TXT, MX or other records that may conflict with the CNAME. Do not overwrite existing records unless you know what they do.
-
Plan for propagation and testing
DNS changes may take time to update across networks. Test the website, SSL, email authentication and connected platforms after the change, especially during migrations.
Professional Context
Can You Add a CNAME Record Yourself?
Our Approach
How We Approach CNAME Records and DNS Management
Useful DNS Terms
These terms often appear when setting up or troubleshooting a CNAME record.
- Hostname
- The specific name being looked up in DNS, such as www.example.com or app.example.com.
- TTL
- Time to live. This controls how long DNS resolvers may cache a record before checking for an updated value.
- Zone Apex
- The root of a DNS zone, such as example.com. Standard DNS does not normally allow a typical CNAME record at this level.
CNAME Record FAQs
These quick answers cover common questions about CNAME records, DNS setup and practical usage.
Can a CNAME point to an IP address?
Can I use a CNAME for my root domain?
Does a CNAME record affect SEO?
Need Help Reviewing Your DNS Records?
If you are preparing for a website launch, hosting migration, email setup or domain review, we can help assess your DNS configuration and plan changes carefully. Start with a practical review before changing records that support your website, email and connected platforms.