Setting up CNAME mapping for white label solution

I’m running a Laravel application on platform.myservice.com and using Cloudflare for DNS management with their free SSL certificate.

I need to allow customers to use their own subdomain to access my application while keeping everything behind my infrastructure.

customer.clientsite.com  ------>  platform.myservice.com

This isn’t a simple redirect but more like domain aliasing. I believe this involves CNAME configuration but I’m not sure about the exact setup.

SSL is required for the application. My main domain has SSL through Cloudflare, but clients may not have SSL on their domains. What’s the best approach to handle SSL in this scenario?

I prefer not to share my server’s IP address directly with clients and want to keep using Cloudflare as my DNS provider. Simply pointing A records to my server IP isn’t the solution I’m looking for.

I’ve been searching for documentation on this setup but haven’t found clear guidance. What is this configuration typically called so I can research it further?

You want a “white label domain” or “custom domain mapping” setup. You’ll need to configure Laravel to accept requests from multiple domains and handle the Host header properly. Your app needs to recognize which customer is accessing based on their domain and serve the right content.

For SSL, Cloudflare’s Universal SSL won’t cover your customers’ domains automatically. You’ve got two options: make customers use Cloudflare too and set up SSL for SaaS through their paid plans, or use Let’s Encrypt automation on your server to generate certificates on demand. The first option’s cleaner but customers have to change their DNS to Cloudflare nameservers. The second gives you more control but means extra server config for certificate management.

totally, cloudflare’s cname setup works gr8 for this! clients can point their subdomains to yours, and you handle the setup. ssl should be ok but might need upgrading. check their docs for more info!