I just came across this exact issue. Unfortunately I don’t think it’s fixed. I am running 7.20.8. Here is an explanation of the issue and a proposed solution:
The Problem
I have a domain a1.example.com that has a public CNAME record pointing to an external service. Internally, I have a static A record on my MikroTik pointing to a local IP address for split-horizon DNS.
Expected behavior: Internal clients query the MikroTik, receive the local A record (192.168.1.100), and connect to the internal server. The public CNAME should never be involved.
Actual behavior: The MikroTik returns the local A record, but also queries upstream for other record types (AAAA, HTTPS type 65, etc.). The upstream server follows the public CNAME chain, and that CNAME response gets cached. The cached CNAME then overrides the static A record, causing clients to resolve to the external address instead of the local one.
This is documented behavior per MikroTik's own documentation:
"If there is only an A record in the list, but the router receives an AAAA request, then it will reply with an A record from the static list and will query the upstream server for the AAAA record."
Proposed Solution
Add a simple boolean option to DNS static entries, something like:
/ip/dns/static add name=a1.example.com address=192.168.1.100 type=A no-forward=yes
When no-forward=yes is set, the router should:
-
Return the static entry for matching record types (A in this case)
-
NOT query upstream for any other record types for that name
-
Return an empty/negative response for record types that don't have a static entry, rather than forwarding upstream
Summary
RouterOS DNS static entries need a per-entry option (e.g., no-forward=yes) to prevent the resolver from querying upstream servers for record types not covered by static entries. Without this, split-horizon DNS is broken because upstream CNAME records override local A records.