Hosting Industry News & Blog

DNS CNAME Record – What is it and how does it work?

Contributor: Harry Mason

Date: 21 March 2022

DNS CNAME Record – What is it and how does it work?

A CNAME record is a DNS record that allows you to associate one name with another name. When you create a CNAME record, you can point your domain to another record — or alias — that has the same name as itself.

The purpose of the CNAME record is to provide a way for you to leverage a domain name (to which you have the rights) for purposes that you do not own. For example, you may have the rights to build a site on, but you do not own the name itself. You can create a CNAME record pointing the domain name to your domain. The name used for the CNAME record (e.g. is the alias (or target) for the domain name.

A common misunderstanding is that a CNAME record must always resolve to the same website as the domain it points to, although this isn’t true. The CNAME record merely directs the client to the root domain’s IP address. The web server will still handle the URL properly once the client reaches that IP address. For example, might have a CNAME that links to, pointing the client to the IP address of When the client connects to that IP address, the webserver checks the URL and sees that it is, thus the blog page is delivered instead of the home page.

Example of a CNAME record: TTL Type value:
@ 3600 CNAME is an alias of

You can see that points to in this case, and assuming that it is based on our example, We know that the IP address will eventually resolve to a record.

Is it possible for a CNAME record to point to another CNAME record?

It’s impractical to point a CNAME record to another CNAME record because it needs numerous DNS lookups before the domain can be loaded, slowing down the user experience, but it’s feasible. For example, may have a CNAME record that linked to‘s CNAME record, which then pointed to the A record for

CNAME for TTL Type value:
@ 3600 CNAME is an alias of

Which points to a CNAME for

This option adds a step to the DNS lookup process that should be avoided if at all possible. Instead, both au. and www. ‘s CNAME records should link to

What are the constraints of using CNAME records?

MX and NS records must point to an A record (for IPv4) or a AAAA record instead of a CNAME record (for IPv6). A mail exchange record (MX record) is a record that routes messages to a certain mail server. An NS record is a ‘name server’ record that specifies which DNS server for a domain is authoritative.

How to find out your domain’s CNAME record?

Command Prompt

  • Open your Command Prompt or Terminal
  • Type “nslookup [domainname]” then press Enter.
  • The command prompt will display your the name (CNAME) record
Command Prompt CNAME Record

Command Prompt CNAME Record


Newsletter Signup

Signup to our hosting newsletter, to keep up to date with all the latest hosting news, special offer and updates from Hosting Australia.

Related Posts