A server with the specified hostname could not be found

So after moving to iPhone I keep getting this error message completely random on my phone. On my laptop (PC) it works and also on an Android phone so it is iPhone related. Starting to get very frustrating.

The issue is then all of a sudden gone after a afew monutes until next time I get it.

I use Duck DNS but since it is working on other devices at the same time I guess there is something else.

Any idea?

Your iPhone have bad dns servers.
Try using Cloudflare or OpenDNS.

Aha, so maybe related do the adblocker on my iPhone? But then strange that all other sites I try work when my Home Assistant doesn’t work?

The message is from the iPhone, not HA.
The reason why you sometimes get the message and sometimes not is because there are usually multiple DNS servers registered and not all of them have the error.
It can be the DNS servers registered at the phone, it can be ones registered in your browser, if you use DNS-over-HTTPS, it can be the ones your adblocker is using to look sites up and it can be other programs and services in your chain that is also using DNS. The problem is that all these DNS registrations might not even be the same servers, so it can be quite a task to find the culprit.