Skip to main content
CNAME vs ALIAS records

Learn about the difference between CNAME and ALIAS DNS records

Updated over a week ago

CNAME and ALIAS are two different types of DNS records with similar purposes. Both records allow you to point one domain to another, directing traffic to the target domain’s IP address.

The main difference is the following:

  • A CNAME record can be used to map a domain (e.g., www.example.com) to another domain (e.g., example.net). It can’t be used at the root domain level (example.com or @) due to DNS restrictions.

  • An ALIAS record works similarly to a CNAME but can be used at the root domain level (example.com or @), redirecting traffic to another domain without those CNAME restrictions.

The format for adding the ALIAS record on Hostinger hPanel is as follows:

  • DNS record type: CNAME

  • Name: domain.tld or @ (domain.tld = @)

  • Target: the address to direct the traffic to (it can be a sub/domain name, but not a URL)

For example, adding a CNAME record of Hostinger Website Builder on Hostinger hPanel looks like this:

  • DNS record type: CNAME

  • Name: @

  • Target: connect.hostinger.com

Once the CNAME record is saved, it will appear as ALIAS (because a CNAME can't be used with root (@) domains):

ALIAS records resolve to the IP address of the target domain. In the example above, the ALIAS record would resolve to the IP address of connect.hostinger.com which currently is 34.120.137.41.

You can use online tools such as DNS Checker to verify it by checking the A record for your main domain. You need to check the A record because it resolves as an IP address:

The IP address that resolves when checking the main domain's A record will also match the IP address of the target (connect.hostinger.com):

Did this answer your question?