{"id":1697,"date":"2023-11-02T15:16:38","date_gmt":"2023-11-02T15:16:38","guid":{"rendered":"https:\/\/matob.web.id\/random\/?p=1697"},"modified":"2023-11-02T15:16:38","modified_gmt":"2023-11-02T15:16:38","slug":"cname","status":"publish","type":"post","link":"https:\/\/matob.web.id\/random\/cname\/","title":{"rendered":"What is a CNAME? Functions and How It Works"},"content":{"rendered":"<p>Have you ever tweaked the DNS zone editor in your domain or web hosting control panel?\u00a0If so, you may have found a CNAME record.<\/p>\n<p>This DNS record is typically used when you want to link one or more subdomains to the primary domain.\u00a0In addition, there are still other functions.<\/p>\n<p>What exactly is a <a href=\"https:\/\/matob.web.id\/random\/technology\/cname\">CNAME,<\/a> and how does it work?\u00a0See the explanation in this article!<\/p>\n<h2>What is a CNAME?<\/h2>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\" wp-image-1700 aligncenter\" src=\"https:\/\/matob.web.id\/random\/wp-content\/uploads\/sites\/2\/2021\/12\/CNAME.jpg\" alt=\"CNAME\" width=\"1198\" height=\"537\" title=\"\" srcset=\"https:\/\/matob.web.id\/random\/wp-content\/uploads\/sites\/2\/2021\/12\/CNAME.jpg 2298w, https:\/\/matob.web.id\/random\/wp-content\/uploads\/sites\/2\/2021\/12\/CNAME-768x344.jpg 768w, https:\/\/matob.web.id\/random\/wp-content\/uploads\/sites\/2\/2021\/12\/CNAME-1536x688.jpg 1536w, https:\/\/matob.web.id\/random\/wp-content\/uploads\/sites\/2\/2021\/12\/CNAME-2048x918.jpg 2048w\" sizes=\"(max-width: 1198px) 100vw, 1198px\" \/><\/p>\n<p>Canonical Name, or CNAME, is a type of DNS record used to create aliases of domains or subdomains you own.<\/p>\n<p>Suppose you have the domain site.com. At the same time, you want website visitors to be able to access www.situs.com. For this, you can specify site.com as the CNAME of www.site.com.<\/p>\n<p>Then, what is the function of this type of DNS record?\u00a0Let&#8217;s see in the next section.<\/p>\n<h2>Function<\/h2>\n<p>From the explanation of the definition of CName, it can be concluded that its primary function is to create a pseudonym or alias for the main domain.<\/p>\n<p>In addition, several functions can be found in using this <b><a href=\"https:\/\/matob.web.id\/random\/technology\/cname\">CName<\/a><\/b>. Here are the parts:<\/p>\n<h3><span id=\"Menghilangkan_Subdomain\" class=\"ez-toc-section\"><\/span><strong>Remove Subdomain<\/strong><\/h3>\n<p>One of the problems when using an unpaid hosting service is that the provider assigns an additional name (sub-domain) to the main domain.<\/p>\n<p>Examples such as abcd.hosting.com.\u00a0So that the domain can be neat and look premium, you can create a domain abcd.com and set it as your CName.<\/p>\n<p>So with this, your site address becomes neater and looks premium.<\/p>\n<h3><span id=\"Menyambungkan_Layanan_Ke_Subdomain\" class=\"ez-toc-section\"><\/span><strong>Connecting Services To Subdomains<\/strong><\/h3>\n<p>Another valuable function of using CName is as a service connector to the subdomain.<\/p>\n<p>For example, a Customer Retention Management service, known as CRM, can be linked to a subdomain.<\/p>\n<p>From this connection process, you can connect a subdomain, namely crm.abcd.com.<\/p>\n<p>Then leverage CName to connect that CRM service platform to your main site.<\/p>\n<h3><span id=\"Mengarahkan_Domain_Dengan_ccTLD_Menuju_Domain_Utama\" class=\"ez-toc-section\"><\/span><strong>Redirecting Domains With ccTLD Towards Main Domain<\/strong><\/h3>\n<p>ccTLD is an abbreviation of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Country_code\" target=\"_blank\" rel=\"noopener\">country-code<\/a> top-level domain which means a domain name with its existence using a code from a country.<\/p>\n<p>Usually using identities such as .uk, .id, .jp, and others. If you do use the ccTLD for the website,<\/p>\n<p>You can use CName to direct the ccTLD domain to your primary part.<\/p>\n<h2>How it Works<\/h2>\n<p>The purpose of a CNAME is obvious, which is to allow you to point one domain\/subdomain to another. However, how does it work?<\/p>\n<p>To understand this, you need to know the mechanism when someone accesses a website that uses an alias.<\/p>\n<p>For example, you can 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.<\/p>\n<p>Then, the DNS resolver will provide the CNAME record from site.com to the browser.\u00a0Here, the browser understands that www.site.com is an alias of site.com.<\/p>\n<p>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.<\/p>\n<h2>Things to Keep in Mind When Using a CNAME<\/h2>\n<p>If you want to use a CNAME, there are a few things to keep in mind, including:<\/p>\n<ul>\n<li><a href=\"https:\/\/matob.web.id\/random\/1001\/know-domain-level\/\">Domain roots<\/a> (such as site.com) cannot be used as CNAME. The reason is the root domain can only point to IP addresses.<\/li>\n<li>This DNS record can only be pointed to another domain, not an IP address.<\/li>\n<li>Avoid pointing one CNAME record to another CNAME record because it is ineffective.<\/li>\n<li>A domain cannot have DNS records (MX and TXT records) other than CNAMEs.<\/li>\n<li>Not all domains used for email servers have this DNS record.<\/li>\n<li>Do not point MX records and NS records to alias domains.<\/li>\n<\/ul>\n<h2>How to Point Another Domain to a Primary Domain with a CNAME<\/h2>\n<p>CNAME records allow you to point one domain to another. To do this, you must access your <a href=\"https:\/\/matob.web.id\/random\/technology\/cpanel\/\">cPanel<\/a> account by typing in the website URL followed by \/cpanel\u2014<strong>your site.com\/cpanel<\/strong>.<\/p>\n<p>The hosting provider usually provides the cPanel username and password when you purchase a hosting plan.<\/p>\n<p>Once successfully logged in, find and click the <strong>Zone Editor<\/strong> menu. In this menu, you can add or remove settings for all DNS records, including CNAMEs.<\/p>\n<h2>Conclusion<\/h2>\n<p>A CNAME is a DNS record allowing you to use your domain aliases. In addition, you can &#8220;delete&#8221; subdomains, connect a service to your subdomain, and redirect ccTLDs to the primary domain.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Have you ever tweaked the DNS zone editor in your domain or web hosting control panel?\u00a0If 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.\u00a0In addition, there are still other functions. What exactly is a CNAME, and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1701,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-1697","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/matob.web.id\/random\/wp-json\/wp\/v2\/posts\/1697","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matob.web.id\/random\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matob.web.id\/random\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matob.web.id\/random\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matob.web.id\/random\/wp-json\/wp\/v2\/comments?post=1697"}],"version-history":[{"count":2,"href":"https:\/\/matob.web.id\/random\/wp-json\/wp\/v2\/posts\/1697\/revisions"}],"predecessor-version":[{"id":26022,"href":"https:\/\/matob.web.id\/random\/wp-json\/wp\/v2\/posts\/1697\/revisions\/26022"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/matob.web.id\/random\/wp-json\/wp\/v2\/media\/1701"}],"wp:attachment":[{"href":"https:\/\/matob.web.id\/random\/wp-json\/wp\/v2\/media?parent=1697"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matob.web.id\/random\/wp-json\/wp\/v2\/categories?post=1697"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matob.web.id\/random\/wp-json\/wp\/v2\/tags?post=1697"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}