It might not be Home Assistant… is your router setup to log into duckdns? A computer running a logon client? I think Pihole will pick up anything on the network making a request.
Thanks for your replies! Yes, Pi-Hole was reporting queries literally to “yourdomain.duckdns.org”.
It seems that it was a Node-Red problem. A configuration node with the Base URL set to “yourdomain.duckdns.org” was the culprit. (I don’t remember creating this node…)
I had to uninstall and then re-install Node-Red. Here is a related thread: