Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CNAME and TXT record for same subdomain not working [closed]

Tags:

dns

cname

I need to add a TXT record for the subdomain test.domain.com in the zone file. In this zone file there is an existing CNAME for the same subdomain. The two records looking like this:

test IN CNAME asdf.someotherdomain.com. 
test IN TXT "Some text i need to add"

But when I try to save this I get an error:

dns_master_load: :45: test.domain.com: CNAME and other data
zone domain.com/IN: loading from master file  failed: CNAME and other data
zone domain.com/IN: not loaded due to errors.
status: FAIL

It works if I do it with different subdomains, for example:

test IN CNAME asdf.someotherdomain.com. 
testing IN TXT "Some text i need to add"

I'm not exactly the best there is when it comes to DNS. Is it not possible to have the same subdomain in this scenario? Or am I missing something?

The servers are running bind.

like image 704
user5747873 Avatar asked Jan 05 '16 13:01

user5747873


1 Answers

The problem you're having is an issue with the rules of DNS, which forbid a CNAME record where another record exists.

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. This rule also insures that a cached CNAME can be used without checking with an authoritative server for other RR types.

like image 119
Michael B Avatar answered Sep 27 '22 21:09

Michael B