Currenty we have a Cloudflare account which serves our website and some other web apps. We use Cloudflare DNS to proxy the requests to the different pages/workers.
Now, we have a new request from our management, where we need to integrate a custom domain for the Rudderstack. In their documentation they write: You will need access to your domain’s DNS settings as well as your CDN settings. In Cloudflare I can change DNS settings to proxy from api.ourdomain.com to api.rudderlabs.com. But this does not work, I have a Cloudflare error saying: Invalid SSL certificate (526). All certificates are valid and working good. (I tried both Full and Full(Strict) options)
Rudderstack suggest to use Amazon CloudFront to create a CloudFront distribution. Maybe I need to redo the whole DNS setup for our company and start from AWS CloudFront since it looks much more flexible?
Is it possible to do with Cloudflare or am I missing something?


You can setup a Cloudflare worker to do Bulk origin override and send the requests to the RudderStack data plane. Example code that would go in the worker:
In the cloudflare worker's
Custom Domainssetup your subdomain which will generate a certificate for you and should be ready to use