Is it OK to create CNAME records for a dynamic A record?

Soar 116 Reputation points
2023-04-30T04:01:30.5666667+00:00

In my company, they have been using A records only, whether those records are for server names or aliases. And since the best practice is to use CNAME records for aliases, I am planning to change that.

But many of those server name records are dynamic. So I am wondering if I should first make them static before replacing the aliases records with CNAME records. Or is it just fine to keep the server name records the way they are?

Note: I selected Azure DNS tag because there isn't another relevant tag. But the DNS I'm managing isn't Azure.

Windows for business | Windows Client for IT Pros | Networking | Network connectivity and file sharing
Windows for business | Windows Server | User experience | Other
{count} votes

4 answers

Sort by: Most helpful
  1. DF 11 Reputation points
    2023-04-30T09:01:09.3233333+00:00

    Hi Soar,

    Let me first make sure I understand your question correctly.

    Currently, in your non-Azure DNS, you have resources that use static IP with A records and you have alias names for the same resources that also use A records, i.e.

    • ServerName1.yourdomain.com = IP1_address (A record)
    • ServerName1Alias.yourdomain.com = IP1_address (A record)

    Ad you would like to make sure the alias names use CNAME records, so

    • ServerName1.yourdomain.com = IP1_address (A record)
    • ServerName1Alias.yourdomain.com = ServerName1.yourdomain.com (CNAME record)

    I also understand that your concern is that some of the ServerName1 A records point to dynamically set IP addresses.

     

    If so, you are OK to change all records for ServerNameAlias(es) from A to CNAME records. This will work fine with both static and dynamic IP addresses assigned to ServerName (A records).

    As a general rule, your static network infrastructure should be using static IP addresses (so that it doesn’t rely on DHCP service, makes it more robust). In some scenarios however, it is OK to use dynamic IP addresses and DHCP to simplify devices management (i.e. printers). For those scenarios it helps to configure your DHCP to register devices in DNS automatically.

    Hope this helps!


  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    8 deleted comments

    Comments have been turned off. Learn more

  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    4 deleted comments

    Comments have been turned off. Learn more

  4. Soar 116 Reputation points
    2023-05-13T05:37:14.3266667+00:00

    I don't know why you keep talking about DHCP after I explained that all the server are configure with static IP addresses. But I think now I know what to do.

    I'm going to keep the existing dynamic DNS records dynamic. And then wherever I add a new Windows server, I'll let it create its own dynamic record in the DNS.

    And for aliases, I'll do CNAME records regardless of what their A records are.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.