Skip to main content
WP Engine+Cloudflare

Deploy a Cloudflare Worker for WP Engine sites

Promptwatch can capture crawler logs when your WP Engine site proxies traffic through your own Cloudflare zone. This is called Origin-to-Origin (O2O) — traffic hits your Cloudflare zone first, then forwards to WP Engine. Configure DNS first, then deploy the Cloudflare Worker below.

Step 1: Set Up Proxied DNS for WP Engine

Set up proxied DNS for WP Engine in your Cloudflare zone. Follow Cloudflare’s WP Engine guide:
  1. Create a proxied CNAME record pointing your hostname to wp.wpewaf.com (Global Edge Security) or wp.wpenginepowered.com (Advanced Network).
  2. Set Proxy status to Proxied (orange cloud).
Your DNS must be set up via CNAME — A records are not supported for forwarding traffic through Cloudflare Workers.

Create an access token so Promptwatch can deploy the crawler log Worker for you

We’ll automatically discover your Cloudflare zone, upload the script, and configure the route.

The token is only used for this deployment and is never stored.

Step 1: Create an API token on Cloudflare

Go to dash.cloudflare.com → My Profile → API Tokens and create a new Custom Token.

Enable the following permissions:

  • Account / Workers Scripts / Edit — Upload the crawler-log Worker script
  • Zone / Zone / Read — Locate your Cloudflare zone by domain name
  • Zone / Workers Routes / Edit — Attach the script to your domain route

Step 2: Paste the token and deploy

We’ll take it from here — the rest is automatic.

Auto-deploy is only available inside the Promptwatch app. Open Crawler Logs → Settings, select WP Engine + Cloudflare, switch to the Auto Deploy tab, paste your Cloudflare API token, and click Deploy Worker.
For a full list of API response codes, see API Response Codes.