How do I enable our user to add custom domain on our website builder hosted through Worker

We are building a website builder. The output is just html stored in KV and served through Cloudflare worker. Our customer want to add their custom domain. Example: mywebsite.com. How can we do this with Cloudflare DNS API. Is it possible?

I understand that we have to ask the user to add a CNAME or A Record. How to do it so that Cloudflare does automatic SSL.
Any method is appreciate.
Was this page helpful?