we have many different domains set up
we have many different domains set-up with another CDN and all it does is perform redirects. Adding every single domain into Cloudflare will make our zone list very long, and it seems overkill as we're just doing redirects. Is there some way to associate multiple domains with a single zone? or any other suggestions? maybe adding each domain as a custom domain to workers and performing the redirect in code?
9 Replies
scratch the custom domain idea... it only works if the domain matches an active zone
. Is there some way to associate multiple domains with a single zone?Not really, best you can do is CF for SaaS, but without Enterprise you can't do Apex Proxying (i.e the root/site with no subdomain) if your existing provider doesn't support CNAMEs. Then you could have a bunch of rules on that, and most rule limits are per zone.
Is there some way to associate multiple domains with a single zone?That kind of conflicts with the point of a zone, being an administrative space that respects the DNS hierarchy. There are ways to make a zone responsible for traffic from other domains, but there is no way for a zone to have the dns records for different domains. You would be best off just adding every single domain, it's the right way to go about it. You could semi-automate it via the API. There is a generic website overview as well as search tools intended for people with a lot of domains: https://dash.cloudflare.com/websites
@Chaika sorry - what's CF for SaaS? we're an enterprise customer...
https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/
Basically it handles "Custom Domains", it's the same underlying thing Pages or Worker Custom Domains use. It's more meant for customer vanity domains, but you could use it as well to proxy a bunch of your own domains through a single zone. You'd basically CNAME (or A/AAAA records on Ent with Apex Proxying) to a single zone (redirectme.com -> mainzone.com), and you could configure redirect/etc rules to act on that traffic like normal, with their own host headers (Host eq redirect.me). It's a way to do it, but I don't think it would be recommended.
You would still need to have DNS pointing at it though, hosted somewhere, it would just make sense to add all to Cloudflare as full zones imo. Then it's very easy to use them properly later.
Cloudflare for SaaS · Cloudflare for Platforms docs
Cloudflare for SaaS allows you to extend the security and performance benefits of Cloudflare’s network to your customers via their own custom or …
yeah, good point about using them as proper zones later but these are really just domains used for redirects and I don't think they'll ever become full zones... so the Cloudflare for SaaS might not be a bad option... I would just create a zone to handle all these redirects and inside the zone have the redirect rules (using single redirects)
and we do host a lot of DNS in Route53 so that's probably where I'd have to set-up the records
If it helps, Cloudflare is rolling out a feature (10% right now) that allows you to star zones and then filter to just show starred zones
ok that's good to know
@Chaika not sure if you know much about the billing side of it but according to the plans page, "enterprise" shows 0 hostnames included (while free/pro/business include 100). Does this mean that us enterprise customers have to pay per hostname?
looks like it's available as a paid add-on for enterprise customers
I only know what's listed here: https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/plans/
It's a paid addon for all, but free/pro/biz get 100 free, and Ents gets no free quota (i.e Both pay-as-you-go plans and ent do have to pay per hostname, you just get none free). Also Apex Proxying (which you would need if you're using route53, as i don't think they let you use CNAMEs on apex) is another addon, no clue about the actual pricing behind it though
no worries - thanks @Chaika appreciate the feedback