A CNAME (Canonical Name) record is a type of DNS (Domain Name System) record used to alias one domain name to another. It is often used when a domain owner wants a particular domain, or subdomain, to point to another domain’s address.
For example, suppose you have a website hosted at www.example.com
, and you also want blog.example.com
to point to the same location as www.example.com
. Instead of configuring the DNS settings of blog.example.com
to the same IP address as www.example.com
, you can create a CNAME record that points blog.example.com
to www.example.com
. This means that any requests for blog.example.com
will be automatically redirected to www.example.com
.
Here’s an example of how a CNAME record might look:
blog.example.com. IN CNAME www.example.com.
In this example:
blog.example.com.
is the domain or subdomain for which the CNAME record is being created.IN
specifies the class of the record (Internet).CNAME
indicates the type of record.www.example.com.
is the canonical domain to whichblog.example.com
is being aliased.
It’s important to note that CNAME records only point to domain names and cannot be used to directly alias a domain to an IP address. Additionally, a domain cannot have both CNAME and other record types (like A or AAAA records) with the same name simultaneously.
Discover more from
Subscribe to get the latest posts to your email.