Adding a hostname with 'www' to TXT entry in nameserver makes website unavailable - why?
Solution 1:
OK, I can duplicate the behavior (BIND 9.6), and believe I've sussed out the cause:
If you have a wildcard A record and a more specific TXT record as below the A record breaks.
*.test.bsd-box.net. IN A 127.0.0.1
www.test.bsd-box.net. IN TXT "This be a text record, mon!"
but if you have a specific A record it works fine:
*.test.bsd-box.net. IN A 127.0.0.1
www.test.bsd-box.net. IN A 127.0.0.1
www.test.bsd-box.net. IN TXT "This be a text record, mon!"
So apparently having a more specific record (even of a different type) masks the wildcard A record.
I'm not sure what the underlying logic is that causes the wildcard A
record to not be recognized if there's a more specific TXT
record, or if it's an RFC-mandated thing or not, but you can peruse the DNS RFCs (and/or the BIND source) for more details.
Solution 2:
Because it gets in the way of your wildcard ("*
") record. If you have any records for an item, the wildcard no longer matches at all, for any record type.
From RFC1034, §4.3.3:
Wildcard RRs do not apply … [w]hen the query name or a name between the wildcard domain and the query name is [known] to exist. For example, if a wildcard RR has an owner name of "*.X", and the zone also contains RRs attached to B.X, the wildcards would apply to queries for name Z.X (presuming there is no explicit information for Z.X), but not to B.X, A.B.X, or X.
Note that the example doesn't match the OP's situation, but the rule is the same.
Solution 3:
Is it possible that while you were editing the zone you accidentally removed an A record of a CNAME recored?
Perhaps it might be helpful to have a look at your complete Zone file, and see if everything you expect to be there is actually still there?