(bug) DNS Duplicate Record Entry

Just wanted to report a probable bug - I spent the last half hour debugging my setup cuz my DNS wouldn’t work for a domain. It ended up being that I had entered both a CNAME and an A record for the same www subdomain, without realizing it. Hestia didn’t notify me of any issues, BIND worked, the DNS zone appeared to work. I could edit it, etc.

I know it does a bit of conformance checking when you submit the DNS field form (it stops me from submitting a domain name for the value of an A record), so I didn’t know an incorrect entry was possible until I finally went to the OS logs and found that there was an error with the zone file (was pretty easy to find after that).

Speaking of, it might be nice to have access to the computer logs from the Hestia panel. :slight_smile:

You are right there is no duplicate check when adding dns records of different types or even of the same type and as far as I can tell it was a conscious decision by the Vesta team.

I believe that the reason for this decision was that the DNS allows duplicate records in some cases like for ex: A, AAAA, NS, MX etc but not for others like CNAME, PTR, etc. But although you can’t have the same record of CNAME and A types, you can have same record of CNAME and TXT type and there are multiple other similar cases.

So compiling a extensive list of RFC validation rules and implementing them in bash doesn’t look very attractive :smile: . There could be existing projects that could help here. (like named-checkzone)

Displaying journalctl logs is a good idea and we might implement it in a later Hestia release.
eg: /list/server/?dns

If implementing functionality is off the table, perhaps just a note saying to be careful when creating rules as the checks are fairly rudimentary and that it’s POSSIBLE to create an invalid zone file, so the user can be sure to know to check things like that.