Integrations and API
Connect a Shopify store to AI Crawlers
Add a small Cloudflare Worker in front of your Shopify store so AI Crawlers can see which AI bots read it, with steps to undo every change.
7 minute read · Last reviewed: August 14, 2026
This guide connects a Shopify store to AI Crawlers so you can see which AI bots read it. Read it all before you start. If something goes wrong, go to Undo.
For a Shopify theme store whose domain uses Cloudflare for DNS. You add a small Worker in Cloudflare. Your store stays on Shopify.
Before you start
- Your store must use its own domain, such as
yourstore.com, connected in Shopify first. Amyshopify.comaddress does not work. - You need: Access to the Cloudflare account that holds your store's domain. Not on Cloudflare yet? Ask us at team@aipeekaboo.com.
- Time: About 30 minutes.
- Support: Shopify doesn't support this.
- Whoever manages your Cloudflare account, usually a developer or an IT contact, should do the setup. You can send them this page. Steps 4 and 7 use the AI Crawlers page in PeekABoo, so do those together, or pass
worker.jsover a private channel such as a password manager. - Your store stays on Shopify throughout. Steps 3 and 5 can stop it loading, and each has an Undo line. Do the setup at a quiet time.
- Headless Shopify (Hydrogen): ask us.
- Replace
yourstore.comwith your store's domain in every step. - If your store is on a subdomain, such as
shop.yourbrand.com, see step 3. In Cloudflare you still open your main domain, such asyourbrand.com.
A Worker is a script that runs in Cloudflare on the requests your routes cover. It passes each request on unchanged and sends PeekABoo a short record of each bot-like request. A route is the address pattern the Worker runs on. Proxied means Cloudflare sits between visitors and Shopify. DNS only means Cloudflare is out of the path. Fail open means your page still loads if the Worker can't run.
The app shows the same steps one at a time: open AI Crawlers, then choose Shopify. Your site key is created at step 4.
Steps that change your live store have a Changes line and an Undo line. Cloudflare renames screens now and then. If a name differs, look for the closest one, or contact us.
1. Add an HTTPS redirect rule
Shopify renews your certificate over plain HTTP. This rule sends visitors to HTTPS but leaves that renewal alone.
If Always Use HTTPS is already off, ask us first.
- In Cloudflare, open your domain. Open Overview under Rules, choose Create rule, then Redirect Rule.
- Give it a Rule name:
HTTPS except Shopify certificates - Under When incoming requests match, choose Custom filter expression and paste:
(not ssl and not starts_with(http.request.uri.path, "/.well-known/acme-challenge/")) - Under Then, set the target URL to this dynamic expression:
concat("https://", http.host, http.request.uri.path) - Set Status code to 301, turn on Preserve query string, then choose Deploy.
Changes: HTTP visits that go through Cloudflare are sent to HTTPS by this rule.
Undo: Delete the rule on the Overview page under Rules, but only after Always Use HTTPS is back on, or if you stopped before step 2.
2. Turn off Always Use HTTPS
It covers every site on your domain. The rule from step 1 now does its job.
The rule from step 1 also applies to every proxied host in your domain, from the moment you deploy it. After this step, check that your other sites still load over HTTPS. If one does not, stop and contact us.
- Open Edge Certificates under SSL/TLS.
- Turn Always Use HTTPS off. Leave it off while your store's records are Proxied.
Changes: The setting no longer redirects. The rule from step 1 does.
Undo: Turn it back on only after both records are DNS only.
3. Send your store through Cloudflare
Check one setting first, then change two DNS records.
- Open Overview under SSL/TLS. If your current encryption mode is Flexible or Off, or you can't tell which mode is on, stop and contact us at team@aipeekaboo.com. Don't change the setting.
- Open Records under DNS. Write down what your store's records say now.
- Set both records to these values, and save:
- Type: CNAME. Name:
yourstore.com. Target:shops.myshopify.com. Proxy status: Proxied. - Type: CNAME. Name:
www. Target:shops.myshopify.com. Proxy status: Proxied.
Shopify admin may show a warning that Cloudflare's proxy isn't supported. That is expected.
Proxy status must say Proxied. With DNS only, the Worker never runs.
Check your store still loads
Wait 5 minutes, then open your store in a private window. Also open this address. It should move to https://. http://yourstore.com
If it loops or won't load, set both records back to DNS only, wait 5 minutes, then contact us. Don't change other settings to fix it.
Subdomain store, or A records?
- Store on a subdomain, such as shop.yourbrand.com: one record, with that subdomain as the Name.
- A records that point to Shopify: replace them with the CNAME above.
- CAA records you aren't sure about: leave them, and ask us.
On a subdomain, use that exact name wherever this guide says yourstore.com and skip every www line. Wherever a step says "both records", you have one.
Changes: Visits to your store now go through Cloudflare.
Undo: Set both records back to what you wrote down, with DNS only.
4. Create your key and the Worker
The Worker does nothing to your store until step 5.
- In the app, choose Create your key. Your site key comes inside your own
worker.js. Save the file from the key window. We can't show the key again. - Keep the file private. Don't send it by email. Delete your local copy once you have pasted it into Cloudflare.
- In Cloudflare, go to Workers & Pages, choose Create application, then Start with Hello World!
- Name it
aipeekaboo-crawlers, then choose Deploy. - Choose Edit code, select all, and paste your worker.js. Then choose Deploy.
Lost your key? Use New key on the page. Do the same if you shared the file by mistake. The old key stops working within a minute. Paste the new worker.js and choose Deploy. Bot requests before you deploy aren't recorded.
5. Add routes
From here, every visit to your store runs the Worker.
- On the Worker, open Domains and choose Add Route. Pick your domain as the Zone.
- Set Failure mode to Fail open (proceed) on each route. The default, Fail closed (block), can show visitors an error page.
- Replace the filled-in route with one line below. Add one route for each line.
yourstore.com/*www.yourstore.com/*
Changes: Every visit to your store now runs the Worker.
Undo: Delete the routes on the Worker's Domains tab.
6. Keep theme files off the Worker (recommended)
Theme images and fonts load from /cdn/. Keeping them off the Worker helps you stay under the free limit.
- Open your domain's list of Worker routes and add a route with the Worker left empty.
- Add one route for each line, with no Worker:
yourstore.com/cdn/*www.yourstore.com/cdn/*
You can skip this step. Without it, a busy store can reach the free limit, and tracking then pauses until midnight UTC. Your store keeps working.
Changes: Theme files skip the Worker.
Undo: Delete the /cdn/ routes.
7. Check it works
Wait a minute after adding the routes.
- Open
https://yourstore.com/__aipeekaboo-check. It should say sent. If it shows another word, it also says what to do next. - In the app, choose Check now. The chip changes to Test received. The test is not a bot visit and does not open your data. AI Crawlers explains what happens next.
You're done when the chip says Test received and your store loads as before.
Store loops or won't load? Set both records back to DNS only, wait 5 minutes, then contact us.
Bots blocked by Cloudflare?
Cloudflare can block bots before the Worker sees them. Open Security Settings and filter by Bot traffic. A blocked bot looks the same as a bot that never came.
- Bot Fight Mode: if it's on, it can challenge bots first. Turning it off also lets other automated traffic reach your store.
- Configure AI bot policies: choose Allow (do not block) for each kind you want to see.
Blocking AI bots is your choice. We only see the bots you let through.
Changes: The bots you allow can reach your store.
Undo: Set these settings back to what they were.
Known limits and risks
- Shopify says this setup could break at any time. Its support won't help with Cloudflare proxy problems.
- Always Use HTTPS must stay off while your store's records are Proxied. If it is turned on, Shopify can't renew your store's certificate.
- Checkout isn't tracked. Cloudflare doesn't run Workers on /checkout.
- The free plan allows 100,000 Worker requests a day, shared by all your Workers. Past that, tracking stops until midnight UTC. Your store keeps working. That holds only when each route is set to Fail open (proceed), as in step 5.
- Bots Cloudflare blocks first are invisible here.
- Shopify admin may show a warning that Cloudflare's proxy isn't supported. Your store can still work.
Cloudflare describes the DNS side in its Shopify guide.
Undo
- Set both records back to what you wrote down, with DNS only. Shopify's warning can take up to 24 hours to clear.
- Delete the Worker routes, and any /cdn/ routes.
- Delete the Worker. It holds your site key.
- Want Always Use HTTPS back? Turn it on only after both records say DNS only. Then delete the redirect rule.
Setting both records to DNS only takes Cloudflare out of the path, and your store keeps working on Shopify. Disconnecting in AI Crawlers does not undo your Cloudflare changes.
Need help?
Not sure what a screen means, or something looks wrong? Stop there and write to team@aipeekaboo.com or see Contact support. Tell us which step you were on.
Frequently asked questions
My store loops or will not load after step 3. What do I do?
Set both records back to DNS only, wait 5 minutes, then contact us at team@aipeekaboo.com. Don't change other settings to fix it.
Does this change my Shopify store?
Your store stays on Shopify. You change DNS records and add a Worker in Cloudflare, and every change has an Undo line. Setting both records to DNS only takes Cloudflare out of the path.
