Difference Between Similar Terms and Objects

Difference Between DNS and CNAME

As we all probably know DNS is one of the foundations of the internet that works in the background to match the names of the internet sites that people type into a search box with their underlying IP addresses. But there are instances when you have multiple services running on a single server sharing the same IP address like a website and an ftp server. Here, you can use a CNAME record to point the sub domains to the actual domain name. Let’s take a look what exactly is a CNAME record and how it compares to DNS A records.

DNS

Ever wonder how you access the web pages that you do almost every day? When you enter a text or string in your web page like google.com, wikipedia.com, abc.com, etc., DNS translates such requests for names into IP addresses. In the networking world, the computers use numbers to communicate with each other, and humans use names to communicate with each other in the real world. Here, DNS acts as the bridge between names and numbers. So, the Domain Name System (DNS) is like a phone directory of the Internet that maintains a database of internet domain names. DNS is a decentralized naming system that turns human readable domain names into machine readable IP addresses. That’s why we have these IP addresses that are allocated to each and every device on the Internet.

CNAME

CNAME, short for Canonical Name Record, is one of the resource record types in the domain name system used to map an alias name to a true or canonical domain name. CNAME indicates that a domain name is the alias for another domain name. The CNAME is also referred to as the true name and it is easier to think of it as an alias record. Rather than taking a DNS name and pointing it at an IP address, with a CNAME, you can take a DNS name and point it to another DNS name. For example, a CNAME record can map the address www.cname.com to the real website with the domain cname.com. In all cases, the canonical names must always be another domain name and can never be an IP address. A CNAME record is mainly important when multiple services run from a single IP address.

Difference between DNS and CNAME

Meaning 

– The Domain Name System (DNS) is like a phone directory of the Internet that maintains a database of internet domain names. It is a decentralized naming system that turns human readable domain names into machine readable IP addresses. A Canonical Name Record (CNAME), on the other hand, is one of the resource record types in the domain name system used to map an alias name to a true or canonical domain name.

Mapping

 – While both A Records and CNAME Records are standard DNS records, there is a subtle difference between the two. While DNS A Record maps a domain name to one or more IP addresses when the IP are known and stable, a CNAME record maps an alias name to a canonical domain name. For example, a DNS translates a domain name like www.example.com into an IP address such as 192.168.1.1. A CNAME record, on the other hand, maps sub-domains such as www.example.com and ftp.example.net to another domain name, let’s say, example.com.

DNS vs. CNAME: Comparison Chart

Summary

A CNAME Record is particularly useful when you use other people’s services to provide services for your company. Like, for example, many times you use Google apps for your email services. So, if you’re using sub domains and you want to point the sub domain to another domain, you’d plug in mail and then plug in the domain name for Google that you’ve been given to by that vendor. This way when someone types mail.elithetechguy.com, they get routed to the Google servers instead of simply to your email server. That is why CNAMES are important when multiple services run from a single IP address.

Similarities between DNS and CNAME

CNAME is a type of DNS record that maps an alias name to the actual name. CNAME basically points sub domains for your domain to other domain names.

What is DNS CNAME example?

A DNS translates a domain name like www.example.com into an IP address such as 192.168.1.1. A CNAME record, on the other hand, maps sub-domains such as www.example.com and ftp.example.net to another domain name, let’s say, example.com.

Is CNAME the same as domain name?

CNAME allows a domain name to be an alias for another domain which is the true domain. A CNAME record must always point to another domain name and never to an IP address.

Can a DNS record have both A and CNAME?

Technically, you cannot have a CNAME record and other records for the same name. You can use the A record if the IP are fixed, which is the most common use case. You can use a CNAME record if you want to create an alias from one domain name to another domain name.

Can you have 2 CNAME records?

Remember that you can only have a CNAME record on a subdomain. You cannot have another CNAME or any other record. So, you cannot have multiple CNAME records with the same values.

How do I create a CNAME record in DNS?

Simply go to your domain DNS’s records and add a record to your DNS Settings under ‘create new record’, selecting CNAME as the record type. Enter the subdomain, the domain name, and save the settings. Click OK to add the new record and you’re good to go.

Latest posts by Sagar Khillar (see all)

Sharing is caring!


Search DifferenceBetween.net :




Email This Post Email This Post : If you like this article or our site. Please spread the word. Share it with your friends/family.


Leave a Response

Please note: comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

References :


[0]Jeftovic, Mark E. Managing Mission - Critical Domains and DNS: Demystifying Nameservers, DNS, and Domain Names. Birmingham, United Kingdom: Packt Publishing, 2018. Print

[1]Fox, Richard. Linux with Operating System Concepts. Florida, United States: CRC Press, 2021. Print

[2]Hunt, Craig. TCP/IP Network Administration. California, United States: O'Reilly Media, 2002. Print

[3]Krause, Jordan. Windows Server 2016 Administration Cookbook: Core Infrastructure, IIS, Remote Desktop Services, Monitoring, and Group Policy. Birmingham, United Kingdom: Packt Publishing, 2018. Print

Articles on DifferenceBetween.net are general information, and are not intended to substitute for professional advice. The information is "AS IS", "WITH ALL FAULTS". User assumes all risk of use, damage, or injury. You agree that we have no liability for any damages.


See more about : ,
Protected by Copyscape Plagiarism Finder