fritex
2
Regarding 524 error, here are some suggestions and tips to check:
https://support.cloudflare.com/hc/en-us/articles/115003011431-Troubleshooting-Cloudflare-5XX-errors#524error
Are those sub-domains both being cloud at Cloudflare Dashboard?
Moreover, do they both have an SSL certificate installed?
Maybe you would need to have cloud for those DNS records (I assume you are using a CNAME record type?)