Error 502 Bad gateway - random and only on certain subdomains

Did you always run a check consecutively for both addresses (with and without www)?

Yes, after the first time i’ve checked that with www prefix, the url was fine, i tried again for a couple of time with and without the prefix to be sure about it.

So, confirmed: works with www, errors 502 without.

Then i tried turning off the cloud icon, from my cloudlare’s dns settings, i’ve wait for a couple of minutes (checked via ping) for the IP changing… and when the ip changed from Cloudflare’s IP to my host IP… the url is returned to work without 502 errors even without WWW prefix.