Use adguard as dns server for HA

Hi:
I am using AdGuard Complement as DNS server for my home, so I have many dns rewrites in order to access some local services with https.
For example: I use https://jellyfin.mydomain.com. In adguard I have that subdomain redirected to the internal IP (e.g. 192.168.1.200). And in the server (192.168.1.200) i have Nginx Proxy Manager configured to redirect all incoming traffic from https://jellyfin.mydomain.com to a docker container and a port. In nginx proxy manager I have configured https using cloudflare challenge.

Ok, all of this works.

The problem is that now I want to make an api call from home assistant or Nodered to one of this internal services (in this case: https://gotify.mydomain.com), but home assistant and nodered cannot resolve the address.
I have configured as dns server the IP of the HA host, but it seems as it is ignoring it.
I have used dig +trace and it seems that it is not using adguard redirections.

In fact, in adguard, HA IP only shows this query, but no otherone, despite it is connected to the internet and to many cloud services:
checkonline.home-assistant.io

I have been strugling with this problem two days and I cannot find the solution.

I would apreciate any help you can offer.

Thanks

Is there any reason why you wouldn’t simply configure your router DNS to point to AdGuard instead? This removes any problem with your server interacting with nginx proxy. One less thing to troubleshoot.

I have it configured that way, but Home Assistant is ignoring it. It is using cloudflare dns servers

Nodered (as a HA plugin) has the same problem, so it seems related to HAOS or supervisor?

I have found my solution.
In fact, my problem was wrong. I was trying to contact another server which has many network interfaces (network 10 and 20).
Home assistant is in network 10 and i was using a domain name which was pointed to the 20 interface, so it was not reachable by HA.

Anyway, just in case someone have problems with HA dns, it has been key to found my solution restarting HA dns service, so DNS get updated:

ha dns restart

I had to use this command every change I made in order to make sure it was using the last changes.