[Pdns-users] Creating a www CNAME in powerDNS Admin (mysql backend) automatically pointing to @

Brian Candler b.candler at pobox.com
Mon Jan 23 09:32:21 UTC 2023


On 23/01/2023 08:39, Andrea Biancalani via Pdns-users wrote:
>
> Hello there,
>
> do you know if it is possible with pdns Admin GUI (using mysql backend)

Questions about a particular third-party project which integrates with 
PDNS would be better raised with that third-party project.

There are dozens of admin web interfaces:

https://github.com/PowerDNS/pdns/wiki/WebFrontends

If you are talking about the one called "PowerDNS-Admin" then it has its 
own discussion forum here:

https://github.com/PowerDNS-Admin/PowerDNS-Admin/discussions


>> @ IN A 1.2.3.4
>> www IN CNAME *foo.bar*.
>
> so how can I create a functional template to auto add the www record 
> in my template based on domain name? Or... can I solve this using an 
> ALIAS type or something different?

Suppose you had a template like this:

@ SOA ...
@ NS ...
@ MX ...
@ A 192.0.2.1
@ AAAA 2001:db8::1
www A 192.0.2.1
www AAAA 2001:db8::1

An alias record can be used to simplify it to:

@ SOA ...
@ NS ...
@ MX ...
@ ALIAS www
www A 192.0.2.1
www AAAA 2001:db8::1

Or even:

@ SOA ...
@ NS ...
@ MX ...
@ ALIAS webhost.mycompany.com.
www ALIAS webhost.mycompany.com.    ; see [note] below

Behind the scenes, the auth server does a recursive lookup for the ALIAS 
target and returns the A/AAAA records as if authoritative.  It can be 
used to avoid duplicating IP addresses across many zone files.

[note]: that particular one could also be a CNAME; the one above 
couldn't.  But CNAMEs are visible in DNS lookups, whilst ALIAS records 
are invisible.

See also: https://doc.powerdns.com/authoritative/guides/alias.html

HTH,

Brian.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20230123/26c47fb2/attachment.htm>


More information about the Pdns-users mailing list