Edge routing and sitemap control for a Webflow site, built as a Cloudflare Worker

A Cloudflare Worker sitting in front of a Webflow origin that redirects www to the apex domain, proxies every request, and generates the site's sitemap from a mix of static and CMS routes — pending approval to publish under the client's name.
ShapesLab Worker
Client
ShapesLab Worker
Timeline
Private draft
Services
No items found.
Website
About

A Cloudflare Worker that owns host routing and sitemap generation in front of Webflow

This is a specific Worker implementation, but it needs client/project approval before public use. The useful public angle is Webflow proxying, canonical host control, and Worker-generated sitemap behavior.
Challenge

What Webflow's page settings can't do at the edge

A Webflow site can need canonical host control, a generated sitemap that spans both static and CMS-driven routes, and proxy-level behavior that Webflow's own settings don't reach — all of which is easier to own at the edge than to patch together inside the CMS.

Goal

What the Worker needed to own

Build a Cloudflare Worker that redirects www traffic to the apex host, proxies every other request through to the Webflow origin untouched, and generates XML and HTML sitemaps by combining a configured list of static routes with live Webflow collection items.

Result

One Worker: canonical host, proxy, and sitemap in one place

The deployed Worker intercepts requests before they reach Webflow, enforces the apex host as canonical, proxies normal traffic straight through, and serves sitemap requests by combining static route configuration with a live pull of Webflow CMS collection slugs.

Stack
Cloudflare Workers, Webflow origin proxy, Webflow CMS API, sitemap generation
Systems
Webflow, Cloudflare Workers
Category
Custom Solutions
This is some text inside of a div block.

The brief was to put a Cloudflare Worker in front of a Webflow-hosted site so host normalization, proxying, and sitemap generation could be controlled at the edge instead of relying on Webflow's settings alone.

This is some text inside of a div block.

A Webflow site may need canonical host normalization, a sitemap that reflects both static pages and CMS content, and route discovery logic that Webflow's own page settings simply don't expose.

This is some text inside of a div block.

This Worker belongs to a specific client domain and cannot be published, screenshotted, or named until that client approves. Keep private until that approval is in hand.

This is some text inside of a div block.

A Cloudflare Worker redirects www traffic to the apex host, proxies all other requests through to the Webflow origin, generates XML and HTML sitemap responses on request, and fetches Webflow collection items through the Webflow API to include their routes in the sitemap.

This is some text inside of a div block.

Every request to the domain hits Cloudflare first. The Worker normalizes the host, intercepts sitemap requests and builds them from static route configuration plus a live Webflow CMS API pull, and proxies everything else straight through to the Webflow origin unchanged.

This is some text inside of a div block.
  • Canonical www-to-apex redirect
  • Transparent Webflow origin proxying
  • XML and HTML sitemap generation
  • Combined static and Webflow-collection route sources
  • Public-host URL normalization at the edge
This is some text inside of a div block.

This is a solid, working proof of Cloudflare-plus-Webflow routing — currently held private while SoFlow confirms permission to name the client and project publicly.

This is some text inside of a div block.
  • Wrangler configuration names the production host directly
  • Worker source includes working sitemap XML/HTML generation
  • Worker fetches live Webflow collection routes through the Webflow API
This is some text inside of a div block.

Why can't SoFlow name the client publicly yet?

Because this Worker is tied to a specific domain and project, and naming it requires the client's sign-off first. The technique — edge proxying and Worker-generated sitemaps in front of Webflow — is exactly the kind of thing SoFlow can build for another site; it's the name attached to this particular one that needs clearing.

Why put this in Webflow if external code is involved?

Webflow is the public storytelling and CMS layer. External code should stay in the app, Worker, or integration layer where it can be versioned, secured, and tested.

What's needed before publishing?

Written permission to name the project, plus route and sitemap screenshots that don't expose anything the client considers private.

This is some text inside of a div block.

It proves SoFlow can extend a Webflow site's routing and discoverability at the edge with Cloudflare Workers — control that Webflow's own settings can't provide on their own.

This is some text inside of a div block.

Why can't SoFlow name the client publicly yet?

Because this Worker is tied to a specific domain and project, and naming it requires the client's sign-off first. The technique — edge proxying and Worker-generated sitemaps in front of Webflow — is exactly the kind of thing SoFlow can build for another site; it's the name attached to this particular one that needs clearing.

Why put this in Webflow if external code is involved?

This is some text inside of a div block.

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Block quote

Ordered list

  1. Item 1
  2. Item 2
  3. Item 3

Unordered list

  • Item A
  • Item B
  • Item C

Text link

Bold text

Emphasis

Superscript

Subscript

This is some text inside of a div block.

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Block quote

Ordered list

  1. Item 1
  2. Item 2
  3. Item 3

Unordered list

  • Item A
  • Item B
  • Item C

Text link

Bold text

Emphasis

Superscript

Subscript

This is some text inside of a div block.
This is some text inside of a div block.
Before

The Webflow origin alone didn't control canonical hosting, proxy behavior, or a sitemap that reflected both static and CMS content.

After

A single Worker now owns host normalization, request proxying, and sitemap generation in front of the Webflow site.

This is some text inside of a div block.

Webflow's page settings don't give you edge-level redirects, transparent origin proxying, or a sitemap assembled dynamically from multiple route sources — that logic has to live in front of Webflow, not inside it.

Let's talk

Ready to elevate your business?