> ## Documentation Index
> Fetch the complete documentation index at: https://docs.klove.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Cloudflare Setup for Klove Agentic Pages Deployment

> Step-by-step guide to adding your site to Cloudflare and deploying the Klove Worker so AI crawlers are served your optimised agentic pages.

Klove uses a Cloudflare Worker to serve Agentic Pages — AI-optimised versions of your existing pages — to AI crawlers at the edge. This guide explains why Cloudflare is needed and walks you through connecting your site from start to finish.

## Why Cloudflare?

Klove's Agentic Pages work by intercepting requests from AI bots before they reach your origin server. The interception happens at the network edge using a \~200-line Cloudflare Worker script. When the Worker detects a known AI crawler (like GPTBot, ClaudeBot, or PerplexityBot), it serves a clean, structured version of your page instead of your regular site. Human visitors always receive your original site, completely unchanged.

This approach means:

* **Zero code changes** to your existing website or codebase
* **No performance impact** on human visitors
* **Instant deployment** — the Worker sits in front of your site, not inside it
* **Full control** — you decide which pages get agentic versions and which bots receive them

<Warning>
  If your domain is not currently on Cloudflare, changing your nameservers can take **24–48 hours** to propagate globally. Plan accordingly before making the switch.
</Warning>

## Setup steps

<Steps>
  <Step title="Create a Cloudflare account (if you don't have one)">
    Go to [cloudflare.com](https://cloudflare.com) and sign up for a free account. The free plan is sufficient for Klove's edge Worker deployment.
  </Step>

  <Step title="Add your site to Cloudflare">
    1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com).
    2. Click **Add a site** and enter your domain name (e.g. `yourdomain.com`).
    3. Select the **Free** plan (or a higher tier if you already have one).
    4. Cloudflare scans your existing DNS records automatically. Review the imported records and confirm they are correct before proceeding.
  </Step>

  <Step title="Update your nameservers">
    Cloudflare will provide you with two nameserver addresses (e.g. `ada.ns.cloudflare.com` and `cole.ns.cloudflare.com`).

    Log in to your domain registrar (GoDaddy, Namecheap, Google Domains, etc.) and replace your current nameservers with the ones Cloudflare provided.

    Once saved at your registrar, Cloudflare will detect the change and activate your domain. This typically takes a few minutes to a few hours, but can take up to 48 hours in some cases.

    <Note>
      You do not need to move your hosting — only your nameservers need to point to Cloudflare. Your origin server stays exactly where it is.
    </Note>
  </Step>

  <Step title="Verify your domain is active">
    Return to the Cloudflare dashboard. Once your nameservers have propagated, your domain's status will show **Active**. You'll also receive a confirmation email from Cloudflare.

    At this point, all traffic to your domain passes through Cloudflare's edge network and the Klove Worker can be deployed.
  </Step>

  <Step title="Deploy the Klove Worker">
    Back in Klove, go to **Settings → Agentic Pages → Deploy**.

    You have two options:

    * **Automatic setup** — provide a Cloudflare API token with Workers permissions and Klove deploys the Worker for you in seconds.
    * **Manual setup** — download the Worker script and deploy it yourself via the Cloudflare dashboard or the Wrangler CLI.

    For automatic setup:

    1. In Cloudflare, go to **My Profile → API Tokens → Create Token**.
    2. Use the **Edit Cloudflare Workers** template (or create a custom token with `Workers Scripts: Edit` permission).
    3. Copy the token and paste it into Klove's deployment screen.
    4. Click **Deploy** — Klove handles the rest.

    Once deployed, the Worker is live. AI crawlers visiting your site will immediately start receiving your agentic pages.
  </Step>
</Steps>

## What happens after deployment

After the Worker is live, you can:

* **Track AI bot visits** in the Klove dashboard under **Agentic Pages → Bot Visits**. You'll see which bots are crawling, which pages they access, and when.
* **Build and publish agentic pages** for the URLs you want to optimise. Use the AI-powered editor in Klove to generate structured content, FAQs, and schema markup.
* **Configure bot routing** — choose which AI crawlers receive your agentic pages and which see your regular site.

<Note>
  If Cloudflare's Bot Fight Mode is enabled on your account, AI crawlers may be blocked before the Worker can intercept them. See the [Allow AI Bots guide](/allow-ai-bots) to make sure the right bots are permitted through.
</Note>
