ALIAS record is one of the not-so-popular DNS records, but it is also very interesting. So let’s explain a little bit more about it.
ALIAS record explained.
The ALIAS record is a DNS record, which helps with linking two hostnames. Simply it is explaining that one of the hostnames is just another way to write the other one. This DNS record is not one of the standard ones, and actually, not every Managed DNS provider is offering it. The main benefit that comes with applying this record is that it can coexist with other DNS records, such as MX record. For example, the CNAME record is not able to do the same. Another amazing thing about it is that it will take a lot less time and present the other hostname and IP address.
The only thing that can make you consider use CNAME record than ALIAS is when you are implementing CDN.
Why should you apply it?
- When you apply this DNS record, you can use it to the root of our domain. A CNAME record can not provide such a thing.
- It operates excellent with a Round-Robin load balancer.
- Compared to the CNAME record, ALIAS is faster. It can also produce back A or AAAA records and resolve the domain through the answer retrieving. This is essential for the clients because it will save time.
- Apply this record because it is possible to coexist with different kinds of DNS records*.
*You can’t set in one zone ALIAS record together with a CNAME record or Web Redirect record.
Inside the ALIAS record
It is actually a very simple DNS record. The ALIAS record holds 4 main values:
- Type: Here, you should set it to ALIAS.
- Host: Here is the host, for which are you creating it.
- Points to: Here is the other hostname to where you want it to point. It has to be a hostname. It is not possible to be an IP address.
- TTL: Set a time that will indicate for how long the record is valid.
How to create an ALIAS Record?
Creating an this DNS record is easy. It is a process with few steps:
In the control panel of your DNS hosting provider.
First, you have to log in to your account.
Second, go to the Master zone, where you want to add it. If you still don’t have a Master DNS zone, you should create one first. After that, add A, AAAA, SOA, and NS records.
Next, check the control panel of your DNS provider. Find “Add Record” or “New Record.” From there, you will see a list of different DNS record types. You should choose the ALIAS DNS record.
Last step. The type of DNS record is already selected. So the last thing you have to do is add the other values, such as TTL, Host, and direct it to the domain name.
You are able to apply it for the root domain or subdomains.