Webflow sync, pageviews & more.
NEW

What does the configuration of Cloudflare Workers look like to set up a separate Guide section as another Webflow site using the CMS system in Webflow when the main site has reached the max page limit? After setting up the configuration, how do I point my main domain at the provided Routes URL from Cloudflare?

TL;DR
  • Publish both Webflow sites to their own subdomains or custom domains (e.g., main-site.webflow.io, guide-site.webflow.io).
  • Create a Cloudflare Worker to route /guides/* traffic to the Guide site and all other traffic to the main site using fetch-and-rewrite logic.
  • Set your domain to use Cloudflare, assign the Worker to run on your domain (e.g., example.com/*), and update DNS with proxy enabled to route all traffic through the Worker.

You're trying to host a separate Webflow CMS site (a "Guide" section) as a standalone instance because your main Webflow site hit the page limit, and you want to combine both sites via Cloudflare Workers with custom routing.

Here’s how to configure this using Cloudflare Workers and then point your domain properly.


1. Upload Both Webflow Sites

  • Publish each Webflow site separately to custom domains or Webflow subdomains (e.g., main-site.webflow.io, guide-site.webflow.io).
  • Make sure the Guide site is fully functional at its assigned subdomain.

2. Write and Deploy Your Cloudflare Worker

Use Cloudflare Workers to create a reverse proxy that maps specific routes (e.g., /guides/**) to your secondary Webflow CMS site.

  • Go to Cloudflare Dashboard → Workers & Pages → Create Worker.
  • Use a basic fetch-and-rewrite Worker like this (you'll need to paste/edit inside the Cloudflare UI):
export default {  async fetch(request, env, ctx) {    const url = new URL(request.url)    if (url.pathname.startsWith('/guides')) {      const newPath = url.pathname.replace('/guides', '') || '/'      const targetURL = `https://your-guide-site.webflow.io${newPath}${url.search}`      return fetch(targetURL, request)    }        // Default to main Webflow site    const targetURL = `https://your-main-site.webflow.io${url.pathname}${url.search}`    return fetch(targetURL, request)  }}
  • Replace your-guide-site.webflow.io and your-main-site.webflow.io with your actual Webflow subdomains or custom domains.

3. Assign Routes to Your Worker

  • In the Cloudflare Dashboard → Workers → Your Worker → Triggers, set the Route to include your domain:
  • Example: example.com/*
  • This will apply the Worker to any request on the root domain.

4. Point Your Domain to Cloudflare

To fully route traffic through your Worker at Cloudflare:

  • Add your domain to Cloudflare and update the domain’s DNS to use Cloudflare nameservers.
  • Set an A record pointing to dummy IPs like 192.0.2.1 or any, since the Worker handles routing (or use dummy proxy targets).
  • Enable the proxy (orange cloud) for that DNS entry.
  • Set the Worker to run on your root domain as configured above.

5. Clean Up for SEO and Caching

  • Handle redirects or trailing slashes, if necessary, inside the Worker.
  • Optionally, implement custom headers inside the Worker for cache control, canonical tags, or robots.txt as needed.

Summary

To serve a Guide section from a second Webflow site, use a Cloudflare Worker as a reverse proxy, routing URLs like /guides/... to your second Webflow instance. Then, point your domain to Cloudflare, map all paths through a Worker route (e.g., example.com/*), and let the Worker split traffic between your main and Guide sites.

Rate this answer

Other Webflow Questions