No subject

Felipe Gasper felipe at
Mon Jun 6 14:09:50 UTC 2022

> On Jun 6, 2022, at 09:57, Dimitris Chryssanthakopoulos via Unbound-users <unbound-users at> wrote:
> Dear Unbound-Users,
> I am trying to do with Unbound what NextDNS calls "CNAME Flattening":
>  - when a request is made for a public host I want an A record for that name, even if 
> strictly speaking it is a CNAME. Is that possible with the available settings?
> To avoid confusion, Unbound may chase the CNAME chain properly (to avoid
> poisoning etc) but it must reply to the original requestor only with an A
> record.

CNAME flattening is how libunbound always works, as far as I can tell: when you request an A record, Unbound will internally resolve all CNAME records.

For example, “”’s CNAME is “”. When I query for CNAMEs, I get the CNAME:

> perl -MDNS::Unbound -E'say join ".", unpack "(C/a)*" for DNS::Unbound->new()->resolve("", "CNAME")->data()->@*'

When I query for A records, though, I just get IPs:

> perl -MDNS::Unbound -E'say join ".", unpack "C*" for DNS::Unbound->new()->resolve("", "A")->data()->@*'


More information about the Unbound-users mailing list