Meet ALIAS—The Next Generation of DNS Record
With the DNS (Domain Name System) groaning under the weight of both old technology and new innovations, it was time to upgrade our system. This means next-generation features and services. That’s why we can now offer ALIAS DNS Records.
In a nutshell, ALIAS Records work a bit like CNAME records. They are primarily used to redirect people who have browsed one of your subdomains, sending them instead to your actual main website. But whereas CNAME Records can’t work with some other types of Record, ALIAS Records can work with just about anything.
If this is all getting a bit technobabble, and you need a bit more info before setting up your brand new ALIAS Records… Let’s start from the beginning…
What Are DNS Records?
The DNS is often referred to as the Internet’s directory. It’s the system that finds the websites you want to visit. It takes the domain name you typed in (like example.com) and syncs you up with the right IP address. But once we start drilling down to deeper levels of technical know-how, it’s best to use some fresh analogies. So, imagine the DNS is the Internet’s mailroom, and the DNS Records are the address book that knows where everything should go.
Why Are There Different Types?
As the Internet has grown and become more sophisticated over the years, so has the DNS—and the types of servers and websites it needs to find. It’s not just about connecting people to IP addresses anymore. There are extra elements like subdomains and email services, so different types of DNS Records needed to be created to cope with the demand.
What Are The Standard Types of DNS Record?
The main types of Host Record that you might be most familiar with are:
- Address (A) Record – these are the main types of Host Record used to direct one domain name to one or more IP addresses. It’s a usual solution for users who have a static IP address.
Example:
You browse for example.com >>> ‘A Record’ directs >>> IP 185.31.17.133 >>> you access example.com
- CNAME Record – used to map one domain name to another name. It’s not allowed to use the main domain (like example.com) in order to point it to another domain.
Example:
You browse for example.blog >>> ‘CNAME’ directs >>> example.com >>> ‘A Record’ directs >>> IP 185.31.17.133 >>> you access example.com
- Mail Exchange (MX) Entry – used to direct email to the correct domain. They essentially tell the DNS where they should deliver your emails.
- TXT Records – not actually used to route anything, but can be searched for within the DNS. Often used by services like Google to verify key information like site ownership.
So Why Use An ALIAS Record?
An ALIAS Record is used to point one domain name to another one. It’s almost the same as a CNAME Record, but the important difference here is that ALIAS can coexist with other records on that name. ALIAS is a virtual type of record, and on the DNS level, it works as if it’s an A Record. Therefore, ALIAS does not conflict with other records on the same hostname.
A CNAME Record takes priority over any other resource record for a given hostname. As such, a CNAME cannot coexist with any other resource record, such as MX or TXT Records. So if you had these other records/services for your example.blog domain they would cease to work, as CNAME Records always take precedence.
ALIAS Records can coexist with others, so no such problems occur. Your DNS Records can all work in harmony.
How Does an ALIAS Work?
ALIAS Records map a domain name to another name, which makes it possible to ‘alias’ the root domain. That basically means they can send users searching for a root domain (like a .com) to a different domain name/website—whichever one you want to send them to. It behaves like an A Record, and because A Records don’t have the limitations of CNAME Records the ALIAS doesn’t inherit them.
Also, if the IP address for the destination changes, ALIAS records pointing to its corresponding domain name update too. So an ALIAS is perfect if you’re trying to alias/redirect the root domain, or if you need other records for the same name.
Take a look at our KnowledgeBase article to discover how to start setting up your ALIAS records now. If you have any questions or need any further advice, please contact our dedicated Support Team day or night.
Does having ALIAS record break the geo routing? For an example, if you are using CDN provider it might use geo routing for optimizing response times. But if you use ALIAS, the DNS query comes not from client’s geo, but namecheap’s name servers geo.
Sorry for the delay. This is the response I got from one of our team members:
In most cases, having an ALIAS record should not break the geo routing. However, there are some setups when the ALIAS record can break this type of routing. For example, if the CDN provider uses the IP resolved by the DNS provider’s servers to determine the location (unicast – our data center IPs in this case), then, the ALIAS record will break geo-routing because the returned IPs will always be from a single location. However, in most cases, CDN providers use something like Anycast. In this case, the incoming requests to a single IP can be routed to a variety of different locations. The ALIAS record will not influence routing in any way because the location will be selected prior to IP resolution.
Some references:
Geographic Routing: https://www.edge-cloud.net/2019/03/01/limitations-of-geo-dns/
Anycast: https://www.cloudflare.com/learning/cdn/glossary/anycast-network/
Unicast vs Anycast (actual issue explanation): https://serverfault.com/a/835760
I hope this helps!