cname (Canonical Name)

CNAME stands for “Canonical Name” and is a type of DNS (Domain Name System) record used to map one domain name to another. In simpler terms, a CNAME record is used to create an alias or shortcut from one domain name to another domain name.

When a client (such as a web browser) looks up a domain name, the DNS system is responsible for translating that domain name into an IP address that the client can use to connect to the appropriate server. With a CNAME record, you can effectively point one domain name to another domain name, allowing both names to resolve to the same IP address.

For example, let’s say you have two domain names: “example.com” and “www.example.com.” You can create a CNAME record that maps “www.example.com” to “example.com.” This means that when someone enters “www.example.com” in their browser, the DNS system will resolve it to the IP address associated with “example.com,” ensuring that both names lead to the same website.

CNAME records are often used for purposes such as:

  1. Subdomains: Creating subdomains that point to the same server as the main domain.
  2. Content Delivery Networks (CDNs): Directing traffic from one domain to a CDN’s domain.
  3. Load Balancing: Distributing traffic among multiple servers using a load balancer’s domain.
  4. Third-Party Services: Linking a domain to a service provider’s domain (e.g., pointing “blog.example.com” to a blogging platform).

It’s important to note that while CNAME records provide flexibility and convenience, they come with certain limitations, such as affecting the performance of DNS lookups due to the need for additional queries. Additionally, CNAME records cannot coexist with certain other record types, like apex records (for the bare domain) in some DNS configurations.

Download Now