Have you ever tweaked the DNS zone editor in your domain or web hosting control panel? If so, you may have found a CNAME record.
This DNS record is typically used when you want to link one or more subdomains to the primary domain. In addition, there are still other functions.
What exactly is a CNAME and how does it work? See the explanation in this article!
What is a CNAME?
Canonical Name , or known as CNAME is a type of DNS record used to create aliases of domains or subdomains that you own.
Suppose you have the domain site.com. At the same time, you want website visitors to be able to access through www.situs.com. For this, you can specify site.com as the CNAME of www.site.com.
Then, what is the function of this type of DNS record? Let’s see in the next section.
From the explanation of the definition of CName, it can be concluded that its main function is to create a pseudonym or alias for the main domain.
In addition, there are actually several functions that can be found in using this CName . Here are the functions:
One of the problems when using an unpaid hosting service is that the provider assigns an additional name (sub-domain) to the main domain.
Examples such as abcd.hosting.com. So that the domain can be neat and look premium, you can create a domain abcd.com and set it as your CName.
So with this your site address becomes neater and looks premium.
Connecting Services To Subdomains
Another very useful function of using CName is as a service connector to the subdomain.
For example, when you have a Customer Retention Management service or known as CRM, it can be linked to a subdomain.
From this connection process, you can get a subdomain that is connected to each other, namely crm.abcd.com.
Then leverage CName to connect that CRM service platform into your main site.
Redirecting Domains With ccTLD Towards Main Domain
ccTLD is an abbreviation of country-code top level domain which means a domain name with its existence using a code from a country.
Usually using identities such as .uk, .id, .jp and others. If you do use the ccTLD for the website,
You can use CName to direct the ccTLD domain to your main domain.
How it Works
The purpose of a CNAME is very clear, which is to allow you to point one domain/subdomain to another. However, how does it work?
To understand this, you need to know the mechanism that occurs when someone accesses a website that uses an alias.
For example, suppose you access www.site.com in a browser. After you enter the URL, the browser will send a DNS request. DNS resolver will look for name servers that have DNS records from site.com.
Then, the DNS resolver will provide the CNAME record from site.com to the browser. Here, the browser understands that www.site.com is an alias of site.com.
Therefore, the same process will be repeated to request the registered IP address for yoursite.com. Only after that, browser users can enter the destination website.
Things to Keep in Mind When Using a CNAME
If you want to use a CNAME, there are a few things to keep in mind, including:
- Domain roots (such as site.com) cannot be used as CNAMEs. The reason is, the root domain can only point to IP addresses.
- This DNS record can only be pointed to another domain, not an IP address.
- Avoid pointing one CNAME record to another CNAME record because it is ineffective.
- A domain cannot have DNS records (MX and TXT records) other than CNAMEs.
- Not all domains used for email servers have this DNS record.
- Do not point MX records and NS records to alias domains.
How to Point Another Domain to a Primary Domain with a CNAME
CNAME records allow you to point one domain to another. To do this, you need to access your cPanel account by typing in the website URL followed by /cpanel. For example yoursite.com/cpanel .
The cPanel username and password are usually provided by the hosting provider when you purchase a hosting plan.
Once you’ve successfully logged in, find and click the Zone Editor menu . In this menu, you can add or remove settings for all types of DNS records, including CNAMEs.
A CNAME is a DNS record that allows you to use aliases for your domain. In addition, you can “delete” subdomains, connect a service to your subdomain, and redirect ccTLDs to the primary domain.Share This Article: