Skip to content
ansvra.Documentation
Connections
Connections

Cloudflare

Create a Cloudflare account API token, select your website, and connect crawler activity to Ansvra.

Ansvra guides·8 min read

Before you start

Connect your Cloudflare website to AI Agent Analyzer to review recorded crawler requests in Ansvra. You will create one account API token with two permission policies, then add it in Ansvra, choose your website, and review the connection.

1. Open Account API tokens

  1. Choose the Cloudflare account

    Open the Cloudflare dashboard. Use the account selector to choose the account containing your website’s domain.

  2. Open the account’s token page

    In the left navigation, expand Manage account, then select Account API tokens. The address ends in /api-tokens after your account identifier. Use this account page rather than User API tokens under My Profile.

Open Manage account → Account API tokens.
Check the page title, then select Create Token.

2. Start a custom token

Select Create Token. In Token name, enter a recognizable name such as Ansvra website connection. Under Permission policies, select Start from scratch, marked Custom, to choose the required permissions individually.

Name the token and choose Start from scratch.

3. Add the account policy

  1. Keep Entire Account selected

    Leave the policy scope set to Entire Account. This policy grants the account’s Workers Scripts permission. The domain permissions belong in a separate policy.

  2. Search for Workers Scripts

    In Search for permission groups…, enter Workers Scripts. Under Developer Platform, find the exact Workers Scripts row, currently marked Legacy, and select Edit. Leave the separate Workers row and its Metadata Read-only, Content Read-only, Editor, and Admin options unselected.

  3. Add the second policy

    Select Add policy beneath the list. Cloudflare keeps the first policy in the form and opens a second editor. The first policy summary reads Workers Scripts Write.

Choose Workers Scripts → Edit. The policy summary calls it Workers Scripts Write.

4. Choose your domain and its permissions

  1. Choose Specified Domains

    In the second editor, open the scope menu showing Entire Account and choose Specified Domains.

  2. Select your website

    Open Select domains…. Use its search field to find the domain used by your Ansvra project, then select that domain. Check the spelling and choose only the intended website. If it is missing, check your Cloudflare account and membership access.

Choose Specified Domains, then pick your website using Select domains….

In the same policy, search for Zone. Under DNS & Zones, find the row named exactly Zone and select Read. Leave DNS, Zone Settings, Zone DNS Settings, and other similarly named rows unchanged.

Select Read on the exact Zone row. Use the domain selector above the search to choose your website.

Replace the search with Workers Routes. Under Developer Platform, select Edit on the Workers Routes row. Changing the search keeps Zone Read selected. Select Close editor to return to the policy summaries. There should now be two policies.

Add Workers Routes → Edit to the same domain policy as Zone → Read.

5. Review, create, and copy the token

Choose a Token expiration that fits your organization’s access policy. Replace an expiring token in Ansvra before it expires. Leave Client IP address filtering empty unless you have confirmed the addresses that will use the connection; entering your own computer’s address can prevent Ansvra from using the token. Select Review token.

Review the name and expiration, then check both permission policies below.
Policy scopeExact summary permissions
Entire account containing your websiteWorkers Scripts Write
Only your selected website domainZone Read; Workers Routes Write
  1. Check and correct the summary

    Confirm the account, domain, expiration, and permissions. Use Back to edit if anything is wrong. The domain policy must contain both Zone Read and Workers Routes Write. Remove unintended selections before continuing.

  2. Create and copy the token

    Select Create token when the summary is correct. Copy the newly displayed token value and keep it private. Paste the full value into Ansvra in the next step. If you leave without retaining the value and cannot retrieve it, create a replacement with the same policies.

Create token is the final action after reviewing the policies and expiration.

6. Add the token in Ansvra

  1. Open website connections

    In Ansvra, select the intended project and open AI Agent Analyzer. Select Connect a source, or Connections if a source exists, then choose Cloudflare. Continue to Connect your website.

  2. Paste the token

    Expand Manual authorization if needed. Paste the full token into Provider access key, then select Find websites. For an existing connection, the action can read Save token. Read the outcome; saving a token alone does not deploy the website connection.

Paste the token into Provider access key in Ansvra, then select Find websites.
  1. Select Website zone

    Choose the domain matching your project in Website zone. If missing, check the Cloudflare account, selected domain, and Zone Read permission. Use Load available websites when offered to reload the selection.

  2. Inspect the route plan

    Select Inspect route plan. Read the proposed route, overlap warnings, and Workers allowance explanation. Resolve conflicts before continuing. The website must be proxied through Cloudflare over HTTPS.

  3. Confirm deployment

    When the route is correct, select I reviewed the route and the Workers allowance., then Deploy Worker. This changes your Cloudflare website configuration. Wait for the outcome and follow any correction requested before retrying.

7. Confirm delivery and resolve problems

On Confirm connection, review Connection details saved, First delivery received, and AI crawler activity detected separately. Waiting for delivery means the first delivery has not arrived. Saving a connection or receiving a delivery does not establish that a recognized AI crawler visited your website.

Why is a permission missing?

Selectable permissions depend on your Cloudflare membership roles. Check that you are in Account API tokens for the correct account and ask its administrator to review access. For Workers Scripts, search the exact name and use its Legacy row as shown above.

Why can’t Ansvra find my website?

Check that the token belongs to the account containing the domain. The domain policy must include that exact domain with Zone Read and Workers Routes Write. Check expiration and IP filtering, then retry Find websites or Load available websites.

Why does deployment need attention?

Read the specific error. Confirm HTTPS and Cloudflare proxying for the hostname, check Workers Scripts Write and Workers Routes Write, and inspect route conflicts. If Ansvra requests Fail open, open that zone’s Workers Routes in Cloudflare and set the route’s request limit behavior to Fail open before retrying.

What if the token expires or is revoked?

Create a replacement with the same account and domain policies. Open the existing connection’s Manual authorization in Ansvra, enter the replacement in Provider access key, and select Save token when offered. Check the connection and delivery status afterward.

Ansvra

A clearer next step.

MEET YOUR AI GUIDE

A little clarity.
A clearer next move.

Ask about Ansvra, AI visibility, or your next step with content.

Opening chat…