Multiple Domain pointing to same worker?

Hello,

I am creating a url shortener service that can have multiple domains. I am trying to figure out if this types of service can be build on top of Cloudflare infra.

Cloudflare worker and KV as data storage cache seems like a good solution. I have the application part figure out. But I am not a network person so I lack the knowledge on the part where I need to point multiple domain the worker.

for example I have 2 domain (could be 100s of domains)

domain1.com > DNS to worker
domain2.com > DNS to worker

Constraints:

  1. Given that domains are from customers I can’t ask them to add domain to their Cloudflare account.
  2. I can have a dns server where I can ask them to setup nameserver ns1.myapp.com ns2.myapp.com

You can use Cloudflare’s SSL for SaaS product to achieve this. It’s free for the first 100 custom domains and then $0.10/domain/month after that. You can read more about it here: https://developers.cloudflare.com/cloudflare-for-saas/.

Thank you for your reply! I have checked the page, Looking great so far. Looks like Apex domains aren’t free? Do you have idea about the cost for apex domain forwarding?

We need to make some rough estimates of cost.

The customer’s DNS provider must support CNAME flattening for apex domains to work, but Cloudflare does not differentiate between apex and sub domains in SSL for SaaS pricing.

The “apex proxying” feature gives you a dedicated set of IP addresses, allowing your customers to use their apex domain regardless of whether their DNS provider supports CNAME flattening.

How to enable apex proxying?

1 Like

You mean the dedicated IPs? You’ll need an Enterprise plan for that.

But you don’t need dedicated IPs as long as your customer’s DNS provider supports CNAME flattening. If your customer’s domain is example.com, you’d just add example.com as a custom hostname and follow the instructions.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.