Skip to content
On this page

Cloudflare SaaS setup

Setting up a Cloudflare zone for SaaS

https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/start/getting-started/

  • Add your zone to Cloudflare on a Free plan.
  • Enable Cloudflare for SaaS for your zone.
    • Select your account and zone.
    • Go to SSL/TLS > Custom Hostnames.
    • Select Enable.
    • Confirm Payment
  • Review the Hostname prioritization guidelines. Wildcard custom hostnames behave differently than an exact hostname match.
  • Create fallback origin
    • Create a proxied A, AAAA, or CNAME record pointing to the IP address of your fallback origin (where Cloudflare will send custom hostname traffic).
      • A proxy-fallback <origin-ip> Proxied
      • AAAA proxy-fallback 100:: Proxied (for worker)
      • or A proxy-fallback 192.0.2.0 Proxied (for worker)
    • Designate that record as your fallback origin.
      • Go to SSL/TLS > Custom Hostnames.
      • For Fallback Origin, enter the hostname for your fallback origin.
      • Select Add Fallback Origin.
      • Once you have added the fallback origin, confirm that its status is Active.
    • Workers as your fallback origin
  • (Optional) Create CNAME target
    • Create a proxied CNAME that points your CNAME target to your fallback origin (can be a wildcard such as *.customers.saasprovider.com).
    • CNAME .customers proxy-fallback.saasprovider.com Proxied

Made with ❤️ using the awesome vitepress