Error while setting CNAME

31 views
Skip to first unread message

Jeetendra Pujari

unread,
Dec 22, 2021, 12:05:33 PM12/22/21
to cloud-dns-discuss
I have a domain example.com in CloudDNS. I am trying to change the DNS records from a A record to a CNAME record for the following 2 entries


When I am trying to update it from A record to CNAME record, I am getting the following error. It was A records because it was previously pointing to instance, now I want to point both the records to a load balancer dns name. Any ideas on how to get past this?

Error message:
The resource record set "entity.change.additions[0]" is invalid because the DNS name "www.example.com." may have either one CNAME resource record set or resource record sets of other types, but not both

Chris (Google Cloud Support)

unread,
Dec 22, 2021, 1:59:32 PM12/22/21
to cloud-dns-discuss
Hello, when changing an 'A' record to a CNAME record you must populate the DNS name field with the desired CNAME, for example 'www.example.com' which would seem to be the case for you, if I understood correctly. The next step would be to populate the 'Canonical name' field with the name of the corresponding 'A' record. For example. if you have an 'A' record byt the name of 'load-balancer.example.com' pointing to the address '1.2.3.4' (this would be your load balancer's front end address) thern you would populate that field with 'load-balancer.example.com'. This will result in 'www.example.com' to resolve to the 'load-balancer.example.com' which would then resolve to the IP address '1.2.3.4'. A takeway from this is that a CNAME record must resolve to an A record.

Hope this helps

Reply all
Reply to author
Forward
0 new messages