To set up a separate Guide section as another Webflow site using the CMS system when your main site has reached the page limit, you can utilize Cloudflare Workers to create a dynamic routing configuration. Here's a step-by-step guide on how to achieve this:
1. Add a subdomain to your main domain: First, you'll need to add a subdomain to your main domain to host the Guide section. For example, you can create a subdomain like "guide.yourdomain.com" to host the Guide site.
2. Configure DNS settings: In your DNS provider account (which could be Cloudflare or any other provider), you need to create a CNAME record for the subdomain you just created. Set the CNAME record to point to `your-webflow-site.webflow.io`, where "your-webflow-site" is the name of your original Webflow site. This step ensures that traffic to the new subdomain is directed to Webflow.
3. Set up a Cloudflare Worker: Now, you'll create a Cloudflare Worker that will handle the routing for the Guide section. In your Cloudflare account, navigate to the "Workers" section and create a new Worker. In the Worker code, you will configure the routing rules based on the URL path.
4. Configure Cloudflare Worker routes: In your Cloudflare Worker code, you'll add a route for your Guide section. This route will match the specific path where your Guide CMS content should be served. For example, if you want the Guide section to be accessible at `guide.yourdomain.com/guide`, the route would be configured as:
```javascript
addEventListener('fetch', event => {
const { request } = event;
const url = new URL(request.url);
if (url.pathname.startsWith('/guide')) {
const originURL = `https://your-webflow-site.webflow.io/${url.pathname.substr(7)}`;
event.respondWith(fetch(originURL));
}
});
```
Change `your-webflow-site` to the name of your original Webflow site.
5. Deploy and test the Cloudflare Worker: Once your code is ready, deploy the Cloudflare Worker. You can then test the routing to ensure the Guide section is being served correctly by accessing your new subdomain (`guide.yourdomain.com/guide`).
6. Point your main domain to the Cloudflare Worker: To direct your main domain to the new Guide section, you'll need to set up a redirect or rewrite rule in the Cloudflare dashboard. In the Cloudflare dashboard, navigate to the "Page Rules" section and create a new page rule. Set the URL pattern to match your main domain (e.g., `yourdomain.com/*`) and configure the forwarding URL to redirect to your Cloudflare Worker route (`guide.yourdomain.com/guide/$1`). This will ensure that when someone visits your main domain, they are redirected to the Guide section.
By following these steps, you can set up a separate Guide section as another Webflow site using the CMS system, even if your main site has reached the page limit. The Cloudflare Worker handles the routing, while the DNS and page rules in Cloudflare ensure that your main domain points to the Guide section accurately.