What happens if i have both A record and CNAME record on my domain

Let's suppose i have a domain which DNS contains 2 records:

  • a "A" record which contains an IP Address
  • a "CNAME" record which contains another domain (alias). Let's suppose this domain contains an IP to a second IP Address

My question is: Which one of the 2 IP Addresses will be answered if i ask a DNS resolution of my domain ?

Thanks


You cannot have a CNAME record and other records for the same name.
If the scenario in the question is that you would have a CNAME record and an A record side by side, that is not really a concern since it is not possible.