Cloudflare Docs
Cloudflare for Platforms
Cloudflare for Platforms
Edit this page
Give us feedback
Set theme to dark (⇧+D)

Workers as your fallback origin

If you are building your application on Cloudflare Workers, you can use a Worker as the origin for your SaaS zone (also known as your fallback origin).

  1. In your SaaS zone, create and set a fallback origin. Ensure the fallback origin only has an originless DNS record:

    • Example: AAAA 100::
  2. In that same zone, navigate to Workers Routes.

  3. Click Add route.

  4. Decide whether you want traffic bound for your SaaS zone ( to go to that Worker:

    • If yes, set the following values:

      • Route: */* (routes everything — including custom hostnames — to the Worker).
      • Worker: Select the Worker used for your SaaS application.
    • If no, set the following values:

      • Route: *.<zonename>.com/* (only routes custom hostname traffic to the Worker)
      • Worker: None
  5. Click Save.