How to allow customers to use custom domain?

For example, I have my application hosted on Cloudflare worker with domain dayschedule.com and each customer get their subdomain on signup with wildcard routing - For example vikash.dayschedule.com

How can I use Cloudflare to allow our customers to map their domain via CNAME mapping?

For example -
  • vikash.com > vikash.dayschedule.com
  • alpha.com > alpha.dayschedule.com
I will use D1 to store mapping when reigstered by customers, also the HTTPS expected to work on all links.
Was this page helpful?