Skip to main content
Shopify+Cloudflare

Deploy a Cloudflare Worker for Shopify stores

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

Step 1: Set Up Proxied DNS for Shopify

Set up proxied DNS for Shopify in your Cloudflare zone. Follow Cloudflare’s Shopify guide:
  1. Create a proxied CNAME record pointing your shop domain to shops.myshopify.com.
  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.
Do not enable Cloudflare’s “Always Use HTTPS” setting — use a redirect rule instead so Shopify can complete SSL certificate validation.

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 Shopify + 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.