constellix background

What is a CNAME Record?

Constellix DNS LogoOutage Prevention - CDN Outage - DDos Attack Prevention - DNS Outage


Resources:

Subnet Mask Cheat SheetRecords Cheat SheetGeoDNS ExplainedFree Network TroubleshooterKnowledge BasePricing CalculatorLive CDN PerformanceVideo Demos


Categories:

BlogsNewsPress ReleasesIT NewsTutorials
Book a Free Demo →

Want DNS Freebies?

Give us your email and we'll send you the good stuff.

Thanks for joining our newsletter.
Oops! Something went wrong.



Categories:

Heather Oliver is a Technical Writer for Constellix and DNS Made Easy, subsidiaries of Tiggee LLC. She’s fascinated by technology and loves adding a little spark to complex topics. Want to connect? Find her on LinkedIn.

Connect with
LinkedIn

https://www.linkedin.com/in/heather-oliver

If you’re familiar with DNS records, you know each record contains information or instructions for DNS servers. They each have a different purpose, but they all work together to achieve one common goal—for users to find your domain on the web. In this resource, we’ll be covering the ins and outs of the CNAME record.

CNAME Records Explained

A canonical name (CNAME) record is simply a record that maps one hostname to another host or to a fully qualified domain name (FQDN). You can think of it as the “Master of Disguise” of DNS records. While it doesn’t actually hide anything, it does let you create aliases that point to your main domain name.

Tip:  If you want to learn more about the different types of DNS records, here’s a helpful cheat sheet for the most common types.

DNS CNAME Use Cases

Using a CNAME is helpful if you’d like to have multiple hosts or subdomains point to the same location, but don’t want to assign an A or AAAA record for each hostname. This way, you only have to change the record the subdomains are pointed to. You can also use CNAMEs when you’d like to have a different hostname for a networking service like FTP directed to your main website. 

Another use case for CNAME records is to use them to point a hostname to a different domain or to an external host. They can also be utilized to point a group of company websites to a parent site, or to have the same domain registered in multiple countries, but with each version pointing to the same place.

CNAME Record Example

As they say, a picture is worth a thousand words. Here are some examples of what a CNAME looks like.

What is a CNAME record - CNAME Record Example Infographic
CNAME Records Explained


subdomain/hostname      Record Type     Destination

www.constellix.com            CNAME           is an alias of constellix.com

news.constellix.com           CNAME           is an alias of constellix.com

ftp.constellix.com               CNAME           is an alias of constellix.com

test.constellix.com             CNAME           is an alias of testing.constellix.com

Each of these examples will eventually resolve to the IP address configured in the A record for your domain.

CNAME Record Limitations

While useful in the above scenarios, CNAME records do have some limitations you should be aware of. For one, CNAME records can’t be used at the root of a domain and cannot be pointed to an IP address. 


🚫 CNAME → 192.0.2.256

✅ CNAME → constellix.com

Also, a CNAME can’t share the same name as another record type for a single domain. 

For instance, if you have an A or an SPF record called “news,” it’s not possible to name your CNAME record “news.” Doing so would trigger an error message upon saving your configuration.

Here’s an example of what an error message for a duplicate naming convention would look like in Constellix.


Adding A CNAME record - Constellix DNS

Another thing to consider is that certain records, such as NS or MX records, can’t point to a CNAME record. One last thing to keep in mind is that CNAME records essentially result in having two queries for one lookup, as a nameserver that finds a CNAME record needs to look for the record that points to the main destination. This is why pointing a CNAME to another CNAME is ill-advised.

Tip: An ANAME record functions like a CNAME, but can be pointed at the root of your domain. With these records, you have the benefits of a CNAME, just without the restrictions.

What is a CNAME Lookup?

If you need to test your CNAME records, you can perform what is called a lookup. There are several online tools that can do this such as:

DNS Tool Box by Constellix

DNS Lookup

MX ToolBox

Google Admin Toolbox

The information provided by online lookup services like the above can vary but typically provide you with the target/destination of your CNAME record, and some include response time and TTL values. You can also use these tools to perform lookups for other records configured for your domain.

DNS CNAME Records: The Takeaway

The main things to remember are that CNAME or canonical name records can’t be pointed to an IP address or used at the root, and that it acts as an alias by mapping one host or subdomain to another.


Simplify & automate your DNS management.

Learn how we can help with a customized demo.

Get Started
pie diagram dnsdns graph
CNAME record, cname record example, cname records explained, cname lookup, dns records, cname use case

Constellix DNS News

Sign up for industry news and insights. It'll be worth it.

Sign up for news and offers from Constellix and DNS Made Easy

Thanks for joining our newsletter.
Oops! Something went wrong.