Edge Routing · Shopify

Install the NORG worker on a Shopify store

Put the same NORG edge-mirror Worker in front of your Shopify storefront, on your own Cloudflare zone, using Cloudflare's Orange-to-Orange (O2O) integration — no API token changes hands.

⚠ Check your Cloudflare Workers plan before installing

On the Free Workers plan, a Cloudflare account is capped at 100,000 worker requests per day. Because this worker's route is {your-shop-domain}/*, once that cap is hit Cloudflare stops invoking the worker and errors every request to your store — shoppers included, not just AI agents. On any store where an outage costs you sales, move to the Workers Paid plan before adding the route.

What this worker does

Visitor What they get
A person in a browser Your storefront, byte-for-byte unchanged
Googlebot, Bingbot, other web-index crawlers Your storefront, byte-for-byte unchanged
An AI agent asking for an already-rendered page The NORG render, served at your own URL — no redirect
An AI agent asking for a page not yet rendered Your page stripped to the token-dense facts, while NORG renders it in the background
Anyone on /checkout Your Shopify checkout, untouched — Cloudflare disables Workers there in O2O setups

Two rules are built in and not configurable: it must never break your store (every failure path falls back to your Shopify-served response), and search engines always see exactly what humans see. NORG only ever mirrors pages from your sitemap — commerce endpoints like /cart are never rendered or mirrored.

Before you start

1

Set up Orange-to-Orange (O2O)

O2O is Cloudflare's supported way to put your own zone in front of Shopify's: traffic hits your zone first (where this worker runs), then flows on to Shopify, which serves your storefront exactly as before. It works on every Cloudflare plan, including free.

Before you start, your zone likely looks something like this — Shopify's own documented shape for a domain connected via third-party DNS, DNS only (grey cloud), nothing proxied through Cloudflare yet:

Type Name Content Proxy status A @ 23.227.38.65 DNS only CNAME www shops.myshopify.com DNS only

(Some older or manually-edited zones carry www as a second A record instead of that CNAME — same fix below, just applied to whichever record is actually there.) Neither reaches Cloudflare's network like this, so this worker cannot run yet — that's exactly what this step changes. Check which host your storefront actually loads at before you continue: many stores redirect the bare domain to www, in which case www is the real host, and both the CNAME below and the route in step 3 need to target it — not the apex.

Create the Shopify CNAME, proxied:

Type: CNAME Name: your-shop.com (or the subdomain your store lives on) Target: shops.myshopify.com Proxy: Proxied (orange cloud)

Then connect the domain in Shopify under Settings → Domains → Connect existing domain, and wait until Shopify shows it connected with SSL active.

Leave "Always Use HTTPS" OFF (Cloudflare zone → SSL/TLS → Edge Certificates). Shopify renews your certificate via Let's Encrypt HTTP-01 challenges against /.well-known/acme-challenge/*, and a blanket HTTPS redirect breaks those challenges — the failure shows up weeks later as an expired certificate. Want HTTP→HTTPS redirects anyway? Create a Redirect Rule that excludes that path instead of using the global toggle.

Sanity-check the storefront in a browser before moving on — it should look and behave exactly as before, with no domain errors in Shopify's admin.

2

Deploy the worker into your own Cloudflare account

Click Deploy to Cloudflare below. Cloudflare forks the worker's repo into your own GitHub/GitLab account and builds it from there — NORG never receives an API token, and never gets deploy access to anything in your account.

Deploy to Cloudflare →

When prompted, fill in two values. Everything else has a default baked into the worker:

Set NORG_SITE_KEY as an encrypted variable (Settings → Variables → toggle Encrypt, or wrangler secret put NORG_SITE_KEY) — never a plain variable, and never committed anywhere.

3

Attach the route manually

In Workers & Pages → the worker → Settings → Domains & Routes → Add route:

Route: your-shop.com/* Zone: your-shop.com

Use {your-shop-domain}/*, not a narrower path — the worker is written to see every request and pass through the ones it doesn't handle. You do not need to carve out /checkout: Cloudflare disables Workers on that path in an O2O setup regardless of the route pattern.

4

Verify the install

Run these against a real page on your store.

An AI agent gets the NORG treatment:

curl -sI -H "User-Agent: GPTBot" https://your-shop.com/products/some-product | grep -i x-norg-edge

X-Norg-Edge: mirror means a render was served; stripped means nothing has rendered yet; no header at all means the worker never saw the request.

A normal visitor is untouched (expect no output):

curl -sI -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0 Safari/537.36" \ https://your-shop.com/products/some-product | grep -i x-norg-edge

Checkout is untouched (expect no output):

curl -sI -H "User-Agent: GPTBot" https://your-shop.com/checkout | grep -i x-norg-edge

Optional — is the worker alive at all?

curl -s -H "x-norg-edge-check: <your-site-key>" https://your-shop.com/ | head -c 200 # {"site_id":"…","version":"…","disabled":false,"ts":…}

A JSON reply confirms the script is deployed, routed, and holding the right key.

If this route doesn't work out

If the button flow fails, your setup can't support it, or you get stuck on any step above, you don't need to debug it alone. Give NORG a scoped Cloudflare API token instead and NORG deploys the worker, creates the route, and verifies the install end to end — including the Shopify-specific checks (O2O CNAME shape, Always Use HTTPS off) that this manual route leaves to you. Full walkthrough: Install a Cloudflare Worker mirror →

Troubleshooting

Limitations of the button install

© 2026 NORG.ai — Content Craft edge routing