Support for CNAME next to host-record

I noticed that there new support for host-record in development It would be nice to also support CNAME to make restricted search possible.

https://github.com/pi-hole/pi-hole/pull/2978

host-record=safe.duckduckgo.com,50.16.250.179
cname=duckduckgo.com,www.duckduckgo.com,safe.duckduckgo.com
cname=duck.com,www.duck.com,safe.duckduckgo.com

https://discourse.pi-hole.net/t/use-dns-to-force-youtube-into-restricted-mode-and-pi-hole/1996/31

It is not in the future database so groups is not possible.

10 posts were split to a new topic: Safe Search

How I see it working:

You could then think about the two entry fields for host-record and IP address. Then a bigger field in which you can past the CNAME domains or just type them in. This is optional because you don’t always want to add CNAME entries.

Pi-hole will then in add them to the config file and put “cname” in front of the list and attach as last the host-record. So a working entry is created and you don’t have to hack’ into the files’in /etc/dnsmasq.d for this anymore.