iPhone Home Assistant Companion App can not find server, but browser and iPad Home Assistant can

I have a similar issue (posted already about it here: duckDNS internal URL not longer working only in iOS (iPhone) app)
I had a workaround, but since I updated to 2025.5 it doesn’t work again.

So this is my setup:

HA running on Raspberry Pi (Supervised)
Remote access with DuckDNS, port forwarding, Dnsmasq and a let’s Encrypt certificate.
And I have set a manual DNS on my iPhone, Android and iPad (for Dnsmasq).

Everything works on Android (HA app and browser)
Everything works on iPad (HA app and browser)
Everything works in the browser of the iPhone.
But it doesn’t work on the HA app on iPhone (anymore).
It used to work fine there until +/- 2 months ago, then the last months I had a workaround where on my local network I used the IP address instead of the duckdns address, but now it completely stopped working. Both if I use the duckdns address or if I use the IP for Internal URL.

In case of IP I get this message

Description:

The certificate for this server is invalid. You might be connecting to a server that is pretending to be “192.168.1.XX”, which could put your confidential information at risk.

Domain:
NSURLErrorDomain

Code:
-1202

URL:
https://192.168.1.*:8123/

In case of duckdns I get this one:

Description:
The request timed out.

Domain:
NSURLErrorDomain

Code:
-1001

URL:
https://*********.duckdns.org:8123/

I already tried clearing the app, removing it, rebooting, changing dns on and off, nothing seems to work. I also checked the apps Local Network, Location and Mobile Data settings, but nothing seems to work. Anyone has an idea what else I could try?

I found a solution. Apparently it had to do with Private Relay / Limit IP address tracking. I’ve turned it off and now the app works again.
See here: Iphone (IOS 16.6.1) ignoring DNS server s… - Apple Community
And here: Manage iCloud Private Relay for specific websites, networks, or system settings - Apple Support

I’m still confused why accessing via the browser on my iphone kept working, as well as the HA app on iPad where Private Relay is also turned on :confused:

[Edit] Now that I know the issue, also found this older topic covering the same issue and solution: After updating, iPhone app will never use internal URL - #11 by activescott