Bluetoba
Bluetoba

Reputation: 955

DNS a vs cname records

Let's say my domain is xyz.com If - I had an A record pointing to an IP address, say 193.10.23.1 - then I had a CNAME www points to blah.cloudfront.net

But of course blah.cloudfront.net is not pointing to 193.10.23.1, will dns look up return the A record or the CNAME record? Is there an order of precedence or whether CNAMES overrides the A record?

Thanks

Upvotes: 0

Views: 689

Answers (1)

Dusan Bajic
Dusan Bajic

Reputation: 10849

DNS standards does not allow having both CNAME and A record:

https://www.rfc-editor.org/rfc/rfc1034#section-3.6.2

If a CNAME RR is present at a node, no other data should be present; this ensures that the data for a canonical name and its aliases cannot be different.

DNS provider will usually will usually prevent you from adding conflicting records:

Cloudflare:

enter image description here

AWS Route53:

enter image description here

Upvotes: 0

Related Questions