Which DNS record allows to create an A Record alias?

An ALIAS record is a type of DNS record that points your domain name to a hostname instead of an IP address.

Important

To add and manage these records through Gandi’s interface and API, please note that your domain must be using Gandi’s LiveDNS nameservers. ALIAS records are not compatible with Gandi’s Classic nameservers (a.dns.gandi.net, b.dns.gandi,net, c.dns.gandi.net).

When do I use an ALIAS record?¶

You will use an ALIAS record when you want the domain itself (not a subdomain) to “point” to a hostname.

The ALIAS record is similar to a CNAME record, which is used to point subdomains to a hostname. The CNAME record only can be used for subdomains, so the ALIAS record fills this gap.

What are the requirements for an ALIAS record?¶

When using an ALIAS record, please note that:

  • There cannot already be an A or AAAA record on the bare domain (@).

  • An ALIAS record will break DNSSEC on the bare domain (@), because @ A and @ AAAA responses will be missing the RRSIG records, which will break resolution on all resolvers.

Can I have an example of an ALIAS record?¶

Here is an example:

@ 10800 IN ALIAS example.example.com.

Please note the final dot (.) at the end is necessary for the record to work correctly.

An ALIAS record (also known as ANAME)is a virtual host record type which is used to point one domain name to another one, almost the same as a CNAME. The important difference is that ALIAS can coexist with other records on that name. An ALIAS record can also be used if you wish to alias the root domain to another service (which you cannot do with a CNAME record).

In short, an ALIAS record allows you to specify a hostname in your DNS records which then resolve to the correct A/AAAA records at the time of a request.


It is possible to set up an ALIAS record manually from our side for domains that are using our BasicDNS, FreeDNS or PremiumDNS.

NOTE: Before creating an ALIAS record, please check there are no CNAME, URL Redirect (Unmasked/Masked/Permanent), A or AAAA records set for the same Host (e.g., yourdomain.tld or example.yourdomain.tld). Such records can conflict with each other, thus, we recommend removing them if you want to have ALIAS.

To set up an ALIAS record, follow these steps:

1. Sign in to your Namecheap account.

2. Select Domain List from the left sidebar and click the Manage button next to your domain:

Which DNS record allows to create an A Record alias?


3. Navigate to the Advanced DNS tab at the top of the page and find the Host Records section. Click the Add New Record button:

Which DNS record allows to create an A Record alias?

4. Select ALIAS record from the drop-down menu for Type, put @ (your bare domain, e.g., yourdomain.tld) for Host and enter the needed value (e.g., example.com) into the Value line:

Which DNS record allows to create an A Record alias?

Set TTL (only 1 min or 5 min are available):


Which DNS record allows to create an A Record alias?

More details on hosts you can use can be found in the "How do I create a subdomain for my domain?" article.

5. Click on the Save All Changes button each time you need to save the record:

Which DNS record allows to create an A Record alias?

Once all settings are made, wait for 30 minutes for the host records to be accepted globally.

Last updated: 2021-05-19

I am creating custom DNS records for services hosted on AWS. What type of alias record should I use?

Short description

Amazon Route 53 alias records are mapped internally to the DNS name of alias targets such as AWS resources. Route 53 monitors the IP address associated with an alias target's DNS name for scaling actions and software updates. The authoritative response from Route 53 name servers contains an A record (for IPv4 addresses) or AAAA record (for IPv6 addresses) with the IP address of the alias target.

Resolution

Create an alias record

Create your record using the Route 53 console and specify the necessary values for alias records.

Be sure to use the correct DNS record type for IP addresses in the service you're pointing to:

  • Amazon CloudFront distribution – A record (IPv4) or AAAA record (IPv6)
  • AWS Elastic Beanstalk environment – A record (IPv4)
  • Elastic Load Balancing (ELB) load balancer – A record (IPv4) or AAAA record (IPv6)
  • Amazon Simple Storage Service (Amazon S3) bucket – A record (IPv4)
  • Amazon API Gateway custom regional API and edge-optimized API – A record (IPv4)
  • Amazon VPC interface endpoint – A record (IPv4)
  • AWS Global Accelerator – A record (IPv4)
  • Another Route 53 record in the same hosted zone

Note: Some services require you to set up a custom DNS name before creating the record. These services include Amazon API Gateway and Amazon Cloudfront.

CNAME support

Route 53 follows the pointer in an alias record only if the record type matches. To create an alias record for a CNAME record, the alias target must resolve to a CNAME value.

Even if you create an invalid CNAME(ALIAS) record, Route 53 can't resolve the IP address of the endpoint. As a result, Route 53 returns an SERVFAIL/REFUSED RCODE error.

Valid CNAME(ALIAS) record:

Invalid CNAME(ALIAS) record:

Pointing from non-Route 53 DNS providers

If you use a DNS provider other than Route 53 for your domain name, then you might be able to point the domain to services hosted on AWS. Check if your DNS provider supports CNAME records on a root domain using techniques such as CNAME flattening, ANAME records, or WebHops redirection.

Considerations for creating CNAME records

1.    You can't create a CNAME record for the Parent, Naked, or Apex domain. With Route 53, you can use an alias record to point the parent domain to other supported alias targets.

For example, if you created a hosted zone for the domain "example.com", then you can't create the following CNAME record.

example.com CNAME dualstack.elb123.us-east 1.elb.amazonaws.com.

If you created a hosted zone for the domain "www.example.com", then you can't create the following CNAME record:

www.example.com CNAME dualstack.elb123.us-east 1.elb.amazonaws.com.

With Route 53, you can create an alias record instead. For example:

example.com Alias(A) dualstack.elb123.us-east 1.elb.amazonaws.com.

2.    CNAME records can't coexist with other record types for the same domain in the hosted zone file. For example, you can have only one record type for the domain "example.com" if the record type is CNAME. You can't create the following record:

abc.example.com CNAME www.example.com
abc.example.com A     54.239.28.85

3.    You can create a wildcard record that can coexist with the CNAME record. For example:

abc.example.com CNAME www.example.com
*.example.com   A     54.239.28.85


Did this article help?


Do you need billing or technical support?

AWS support for Internet Explorer ends on 07/31/2022. Supported browsers are Chrome, Firefox, Edge, and Safari. Learn more »

Which DNS record is for alias Records?

An ALIAS record is a virtual record type DNSimple created to provide CNAME-like behavior on apex domains . For example, if your domain is example.com, and you want it to point to a host name like myapp.herokuapp.com , you can't use a CNAME record, but you can use an ALIAS record.

Is an A record an alias?

A records are standard DNS records while Alias records are custom DNS records. One of the significant differences between an A record and an Alias record is that the A record points a domain name to an IP address. In contrast, an Alias record is used when you want a domain name to point to another domain name.

What is DNS record Type AAA and A?

What is a DNS AAAA record? DNS AAAA records match a domain name to an IPv6 address. DNS AAAA records are exactly like DNS A records, except that they store a domain's IPv6 address instead of its IPv4 address.

What is Aname vs CNAME?

Just like CNAME, ANAME maps one domain name to another. So, an ANAME is configured to point to another domain. When the domain name an ANAME points to is queried by the client browser, it responds with an IP address. A CNAME, on the other hand, cannot point to an IP address, but an ANAME can.