Pi-Hole , DOH & macOS

Hello,
As we discussed there we found that safari ( and some apps) are skipping the DNS resolution ...

I'm looking if forcing DOH on macOS with a profile can fix it.

All the logic is described here: https://neilzone.co.uk/2021/03/dns-over-https-on-macos-and-ios and with a tool like Imazing Profile Editor it's easy to do a profile...

The only issue I have no clues on what to use to redirect to my Pi-hole device (running on a RPi4)

I run Safari on three Mac OS versions (Mojave, Catalina and Big Sur) and have not found this to be the case. The behavior you are reporting is not baked into MacOS or Safari.

I would contact the author of the article and ask them what front-end DoH proxy they are using.

I put some wireshark traces on the link I posted.
my device has the same name internally and externally with an Internal IP and an external IP.
as soon as I access to the device it swap to the external IP, even the ping is going to the external IP and the only way to comeback to the internal one is to flush the DNS