We are going to explore one alternative to the CNAME record, which has many advantages – the ALIAS record. With it, you can have different DNS records in the same DNS zone and even put ALIAS records inside the root. Put ALIAS records where you can’t do it with CNAME records and manage your DNS easier.
The ALIAS record is one of the DNS record types which serves to connect one hostname to another. After that, it will resolve to A or AAAA record (an A to IPv4 address and an AAAA to IPv6 address) that already exists for the second hostname. ALIAS has the benefit of being allowed for the root domain, and you can put it in a DNS zone with other DNS records like MX records.