• Log In
  • Sign Up
  • Contact Us
PowerDMARC
  • Features
    • PowerDMARC
    • Hosted DKIM
    • PowerSPF
    • PowerBIMI
    • PowerMTA-STS
    • PowerTLS-RPT
    • PowerAlerts
    • Reputation Monitoring
  • Services
    • Deployment Services
    • Managed Services
    • Support Services
    • Service Benefits
  • Pricing
  • Power Toolbox
  • Partners
    • Reseller Program
    • MSSP Program
    • Technology Partners
    • Industry Partners
    • Become a Partner
  • Resources
    • DMARC: What is it and How does it Work?
    • Datasheets
    • Case Studies
    • Blog
    • DMARC Training
    • DMARC in Your Country
    • DMARC by Industry
    • Support
  • About
    • Our company
    • Clients
    • Contact us
    • Book a demo
    • Events
  • Menu Menu

What is a DNS CNAME Record?

Blogs
What is a DNS CNAME Record

The CNAME record is one of the first things you will encounter as you begin to learn more about DNS. Whether you are a novice just delving into the intricacies of DNS or a seasoned professional looking to better understand a specific type of DNS record, this article will bring you up to speed on what a CNAME record is, why it matters, and how to create one for your domain name.

What is a CNAME Record?

A DNS CNAME record is a record type available in the DNS zone that specifies the canonical name for a domain, which can either be an alias for another domain or a subdomain of the main domain.

A DNS CNAME record maps one hostname to another. This means that you can have multiple hosts with the same IP address, but each with a different name.

For example, www.mydomain.com might be mapped to www1.mydomain.com and www2.mydomain.com so that they all resolve to the same IP address.

Subdomains such as mail and www may have their own DNS records, called CNAMEs, which link them to the content-hosting parent domains.

For example, a CNAME record can map the alias address www.mydomain.com to the canonical address mydomain.com — where nothing has changed about where visitors go: they are still directed towards whatever destination is specified by the actual A records for mydomain.com (which must be kept up-to-date).

The canonical name (CNAME) records are also referred to as “true names” or “canonical names.” It’s because a CNAME record maps an alias name to its true, canonical counterpart.

How to Create a CNAME Record Step-by-Step?

To create a CNAME record for your domain, follow these steps:

  1. Go to the DNS management console.
  2. Click “A Record,” then select “CNAME” from the list of records that appears.
  3. Enter the domain name for which you want to create a CNAME record.
  4. Enter the hostname that will be treated as a subdomain.
  5. Enter TTL (Time to Live) which is the amount of time your record will stay in the cache on systems requesting it.
  6. For systems with a static IP address, the recommended TTL is 1800 or higher. For dynamic IP addresses, use a TTL of 1800 or less.
  7. Select “Create” from the bottom right corner of your screen after filling out all fields to save changes and create your new record.

If you already have a CNAME record published on your DNS, you can check it now using our free CNAME checker tool. 

How do DNS CNAME Records work?

A CNAME record points to its canonical name (the true name of the domain). So when you set a CNAME record for your blog, it will return the IP address for your blog (mydomain.com) via its A record.

When you create a subdomain like www.blog.mydomain.com and set it as an alias to the root domain name, then a subdomain like www.blog.mydomain.com will have a CNAME record that points to the root domain mydomain.com

When a DNS server looks up for www.blog.mydomain.com using its A record, it will trigger another lookup using CNAME since this is a subdomain of mydomain.com. This will restart the query using the canonical name and return the IP address for mydomain.com via its A record.

*Note: If a host’s IP address changes, it is only necessary to update the DNS A record for the root domain. All CNAME records, including those of the alias or subdomains, will automatically change when changes are made to the root. Refer to the table below for a better understanding:

(sub)Domain / Hostname Record Type Target / Destination
mydomain.com A 333.444.555.111
www.blog.mydomain.com CNAME mydomain.com
ftp.mydomain.com CNAME mydomain.com
mail.mydomain.com CNAME mydomain.com

Main Uses of DNS CNAME Records

A CNAME record is a type of DNS record that has two fields, the canonical name, and the aliases. It is used to:

  • direct a group of websites that are owned by the same entity or organization to the entity’s main site
  • map multiple hostnames for different network services like email or (FTP), each pointing back to the parent domain
  • create a subdomain for each customer on the provider’s domain (self-service), and use CNAME records to point those subdomains back to the customers’ root domains
  • point each country’s version of your site to the main domain
  • set up Content Delivery Network (CDN) by adding the address of CDN as a CNAME record for your website’s origin server–thus ensuring a user trying to access resources on the server is redirected to the CDN, which in turn loads resources from your CDN.

DNS Handling Process of CNAME Records

Consider the example domain PowerDMARC.com: if that is our root, www.powerdmarc.com would map to a CNAME record called “PowerDMARC.com. Here’s how the DNS handling process will work:

Name Type Value
www.powerdmarc.com CNAME powerdmarc.com
powerdmarc.com A 172.66.43.156
  1. A DNS client requests www.powerdmarc.com, creating a DNS request in the process
  2. When this request is made, the DNS resolver looks up which Authoritative Name Server holds the zone file for powerdmarc.com and retrieves any matching records from that file.
  3. The DNS client is returned with a CNAME record.
  4. The DNS client realizes that www.powerdmarc.com is an alias, and it issues a new DNS query for the root domain powerdmarc.com
  5. The DNS resolver returns the A record for powerdmarc.com, which contains its IP address.
  6. The DNS client successfully connects to powerdmarc.com via its IP address.

CNAME Record vs A Record vs Alias Record

A record, CNAME record, and Alias record are three DNS records that are used in a DNS infrastructure. Each of these records has its function and purpose. It is important to understand the differences between these three records so you can use them effectively. Let’s look at how each one works.

➜ CNAME Record maps a hostname to another hostname but does not allow other DNS records on the same hostname (such as MX Records).

➜ Alias Record is similar to a CNAME record in that it maps one hostname name to another hostname—but it does allow other DNS records on the same hostname. Because of this addition, it is not possible to apply ALIASES at the apex DNS zone level.

➜ A Record is a single-label mapping between a hostname and one or more IP addresses. The A record maps a single hostname (the label) to one or more IP addresses (the values).

DKIM CNAME Records

Some email vendors may require you to publish a DKIM CNAME record on your DNS for source alignment purposes. 

An example of this is when you want to enable office 365 DKIM record. 

CNAME Record and 301/302 Redirects: Are They The Same?

Both CNAME records and 301 redirects are used by web browsers to direct users from one domain to another via an intermediary domain. However, there’s a big difference between the two:

A CNAME record maps an existing hostname to another hostname within the same FQDN, while a 301 redirect sends the request to the server that hosts your website.

In other words, the CNAME record points the domain name or subdomain of your site to the IP address of the destination hostname, which means it’s not redirecting; it’s just pointing.

dns cname record

  • About
  • Latest Posts
Ahona Rudra
Digital Marketing & Content Writer Manager at PowerDMARC
Ahona works as a Digital Marketing and Content Writer Manager at PowerDMARC. She is a passionate writer, blogger, and marketing specialist in cybersecurity and information technology.
Latest posts by Ahona Rudra (see all)
  • DMARC Black Friday: Fortify Your Emails This Holiday Season - November 23, 2023
  • Google and Yahoo Updated Email Authentication Requirements for 2024 - November 15, 2023
  • How to Find the Best DMARC Solution Provider for Your Business? - November 8, 2023
August 26, 2022/by Ahona Rudra
Tags: canonical name record, cname, cname records, dns cname, dns cname record, what is a DNS cname record, what is cname, what is cname record
Share this entry
  • Share on Facebook
  • Share on Twitter
  • Share on Twitter
  • Share on WhatsApp
  • Share on LinkedIn
  • Share by Mail

Secure Your Email

Stop Email Spoofing and Improve Email Deliverability

15-day Free trial!


Categories

  • Blogs
  • News
  • Press Releases

Latest Blogs

  • dns cname record
    DMARC Black Friday: Fortify Your Emails This Holiday SeasonNovember 23, 2023 - 8:00 pm
  • Google and Yahoo New Requirements 2024
    Google and Yahoo Updated Email Authentication Requirements for 2024November 15, 2023 - 3:23 pm
  • protect from spoofing blog
    How to Find the Best DMARC Solution Provider for Your Business?November 8, 2023 - 6:29 pm
  • Preventing-Phishing-Attacks-in-Academic-Institutions
    Preventing Phishing Attacks in Academic InstitutionsOctober 31, 2023 - 2:29 pm
logo footer powerdmarc
SOC2 GDPR PowerDMARC GDPR comliant crown commercial service
global cyber alliance certified powerdmarc csa

Knowledge

What is Email Authentication?
What is DMARC?
What is DMARC Policy?
What is SPF?
What is DKIM?
What is BIMI?
What is MTA-STS?
What is TLS-RPT?
What is RUA?
What is RUF?
AntiSpam vs DMARC
DMARC Alignment
DMARC Compliance
DMARC Enforcement
BIMI Implementation Guide
Permerror
MTA-STS & TLS-RPT Implementation Guide

Tools

Free DMARC Record Generator
Free DMARC Record Checker
Free SPF Record Generator
Free SPF Record Lookup
Free DKIM Record Generator
Free DKIM Record Lookup
Free BIMI Record Generator
Free BIMI Record Lookup
Free FCrDNS Record Lookup
Free TLS-RPT Record Checker
Free MTA-STS Record Checker
Free TLS-RPT Record Generator

Product

Product Tour
Features
PowerSPF
PowerBIMI
PowerMTA-STS
PowerTLS-RPT
PowerAlerts
Reputation Monitoring
API Documentation
Managed Services
Email Spoofing Protection
Brand Protection
Anti Phishing
DMARC for Office365
DMARC for Google Mail GSuite
DMARC for Zimbra
Free DMARC Training

Try Us

Contact Us
Free Trial
Book Demo
Partnership
Pricing
FAQ
Support
Blog
Events
Feature Request
Change Log
System Status

  • Français
  • Dansk
  • Nederlands
  • Deutsch
  • Русский
  • Polski
  • Español
  • Italiano
  • 日本語
  • 中文 (简体)
  • Português
  • Norsk
  • Svenska
  • 한국어
© PowerDMARC is a registered trademark.
  • Twitter
  • Youtube
  • LinkedIn
  • Facebook
  • Instagram
  • Contact us
  • Terms & Conditions
  • Privacy Policy
  • Cookie Policy
  • Security Policy
  • Compliance
  • GDPR Notice
  • Sitemap
What is a DNS TXT Record?What is a DNS TXT RecordWhy Do Cyber Attackers Commonly Use Social Engineering AttacksWhy Do Cyber Attackers Commonly Use Social Engineering?
Scroll to top