WebSocket error in iOS app

I have been using the iOS app for a few years now. I have a static WAN IP address, and my domain DNS record was pointing directly to my WAN IP address. Internally I am using NGINX Proxy Manager to provide my LetsEncrypt Cert and direct my sub-domain to my HA instance. This has been working great for a few years.

However I have just changed my Name Server to point to CloudFlare so I can proxy my WAN IP address as a bit of extra security. I have created new Lets Encrypt certificates. Everything is woking, except the iOS app externally. The iOS app works internally and I can access my HA instance externally via a web browser, but the iOS app does not connect externally. In the iOS app, under Settings/Server, the Websocket section says Disconnected and I get the following error.

In my configuration.yaml I have the following to allow my NGINX proxy manager to work

  use_x_forwarded_for: true

Where the IP address shown is the IP for my NGINX Proxy Manager.

AS a test I created a new HA instance on another server and this one appears to be working. So does anyone have any idea how I can get this working please.

Update - I’ve reverted my Name Servers away from CloudFlare, 2 of 3 iPhones are now working correctly. But one is still not working, I cannot even get the app working oil the local network now. I have rebooted the phone, deleted the app, rebooted the phone, reinstalled the app and it is still not working. Even on a local connection it now detects the HA instance on the wrong IP address now during the on-boarding setup. How can I get the HA app working again, I’m out of ideas. Something seems very wrong here.

Why would the iOS app show the wrong server address in the on-boarding setup?
I have my main HA instance on and a test setup on
But the iOS app detects a server on

When I enter the correct IP address manually, I get this error

I have three other iOS devices which are working correctly. Other than buy a new phone I’m out of ideas. All this started when I moved my name servers over to CloudFlare, before this everything was working perfectly for a couple of years. Very frustrating.
Can someone please help.

When you provide just the IP address manually, the app doesn’t use any kind of DNS resolution to connect, which means the Webhook Error you’re receiving there is probably unrelated to that. I can’t recall which that error code is offhand, but if you ‘export’ the log files and drop them here with a note linking to this forum post I can take a look to see what the verbose logs include. You can also attach/link then here, but it’s possible it may contain personal information.

Thanks for your response. I’ve sorted it now. I rebooted my HA server and it started working properly. I re-enabled Cloudflare name servers and that is also working. I had restarted HA several times, but not the actual server. Very strange it only affected one device. But all is good now. Thanks for your time.