title | titleSuffix | description | services | author | ms.service | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|---|---|---|
Tutorial: Create an alias record to refer to a resource record in a zone |
Azure DNS |
This tutorial shows you how to configure an Azure DNS alias record to reference a resource record within the zone. |
dns |
rohinkoul |
dns |
tutorial |
04/19/2021 |
rohink |
Alias records can reference other record sets of the same type. For example, you can have a DNS CNAME record set be an alias to another CNAME record set of the same type. This capability is useful if you want to have some record sets as aliases and some as non-aliases in terms of behavior.
In this tutorial, you learn how to:
[!div class="checklist"]
- Create an alias record for a resource record in the zone.
- Test the alias record.
If you don’t have an Azure subscription, create a free account before you begin.
You must have a domain name available that you can host in Azure DNS to test with. You must have full control of this domain. Full control includes the ability to set the name server (NS) records for the domain.
For instructions to host your domain in Azure DNS, see Tutorial: Host your domain in Azure DNS.
Create an alias record that points to a resource record in the zone.
- Select your Azure DNS zone to open the zone.
- Select Record set.
- In the Name text box, enter server.
- For the Type, select A.
- In the IP ADDRESS text box, enter 10.10.10.10.
- Select OK.
- Select your Azure DNS zone to open the zone.
- Select Record set.
- In the Name text box, enter test.
- For the Type, select A.
- Select Yes in the Alias Record Set check box. Then select the Zone record set option.
- For the Zone record set, select the server record.
- Select OK.
- Start your favorite nslookup tool. One option is to browse to https://network-tools.com/nslook.
- Set the query type for A records, and look up test.<your domain name>. The answer is 10.10.10.10.
- In the Azure portal, change the server A record to 10.11.11.11.
- Wait a few minutes, and then use nslookup again for the test record. The answer is 10.11.11.11.
When you no longer need the resources created for this tutorial, delete the server and test resource records in your zone.
In this tutorial, you created an alias record to refer to a resource record within the zone. To learn about Azure DNS and web apps, continue with the tutorial for web apps.
[!div class="nextstepaction"] Create DNS records for a web app in a custom domain