Use EdgeComet on a Shopify store with Cloudflare O2O
A Shopify store connects to EdgeComet through your own Cloudflare zone. With Cloudflare's O2O setup, also called orange-to-orange, requests to your store pass your Cloudflare zone first and then Shopify's. Your zone can run a Worker, which is where EdgeComet installs its routing.
Once O2O is on, the setup is the regular automatic Cloudflare install: EdgeComet adds its Worker and firewall rule to your zone in about a minute. Shoppers keep loading the store from Shopify as before.
Cloudflare documents O2O for Shopify on every Cloudflare plan, and EdgeComet tested this setup on a Shopify store.
What O2O is
Shopify serves stores through Cloudflare for SaaS, on Shopify's own Cloudflare zone. O2O adds your zone in front of it. Cloudflare's Shopify guide describes it:
If you use Shopify and also have a Cloudflare plan, you can use your own Cloudflare zone to proxy web traffic to your zone first, then Shopify's (the SaaS Provider) zone second. This configuration option is called O2O.
O2O turns on when your zone holds a proxied CNAME record to shops.myshopify.com for the store's hostname. There is no separate switch. The settings of your zone apply to the traffic first, then Shopify's.
The EdgeComet Worker on your zone sends crawler page requests to EdgeComet. Everything else goes on to Shopify. When EdgeComet needs a fresh copy, its request passes your zone again, and the Worker sends it to Shopify.
What you get
- Every bot request on record. EdgeComet records each Googlebot, Bingbot, GPTBot, ClaudeBot and ChatGPT-User request with the page it received. Shopify does not document a way to get raw server logs for an online store. See Log Analyzer.
- Pre-cached pages for bots. Bots get current copies of your product and collection pages from EdgeComet's cache, refreshed on your schedule. See Cache.
- Rendering for content added by JavaScript. Content that apps add in the browser, such as reviews, can reach bots that do not run JavaScript. See Choose a serving mode.
- SEO changes without theme edits. Edge SEO changes titles, meta descriptions, canonicals, structured data and redirects in the HTML bots receive. See Edge SEO.
- Your own Cloudflare rules in front of the store. Cloudflare's SaaS customers page says O2O "allows you to benefit from your provider's setup but still customize how Cloudflare treats incoming traffic to your zone."
For catalog, product feed and listing reports, see Shelf Edge.
Before you start
- A Shopify store with your own domain, such as
example.com. - Your domain's DNS on Cloudflare, in your own Cloudflare account. Any Cloudflare plan works.
- A website for the store's domain in EdgeComet. See Add your first website.
- Access to Shopify admin and to the Cloudflare zone, or the people who manage them.
Connect the store to your Cloudflare zone
- In Cloudflare, open your domain's DNS > Records.
- For the root domain, replace the records that point to Shopify with one record: Type
CNAME, Name@, Targetshops.myshopify.com, Proxy status Proxied. Cloudflare flattens aCNAMEat the root. - For
www, set the record to TypeCNAME, Namewww, Targetshops.myshopify.com, Proxy status Proxied. - Save. Cloudflare shows a Shopify icon next to each record value that has O2O on.
- If the domain is not connected to your store yet, in Shopify admin go to Settings > Domains, click Connect existing domain, enter the domain without
wwwand follow the steps.
| Type | Name | Target | Proxy status |
|---|---|---|---|
CNAME | @ | shops.myshopify.com | Proxied |
CNAME | www | shops.myshopify.com | Proxied |
O2O works only with CNAME records. An A record to Shopify's IP address does not route through Shopify's zone.
Keep certificate renewal working
Shopify issues your store's certificate with Let's Encrypt and validates it on /.well-known/acme-challenge/*. Cloudflare's guide warns not to turn on Always Use HTTPS with O2O on Shopify. To force HTTPS, use a redirect rule that excludes /.well-known/acme-challenge/*.
The EdgeComet Worker sends only crawler user agents to EdgeComet, which leaves certificate validation requests to Shopify.
Install EdgeComet on the zone
- In EdgeComet, open Configuration > Connections > CDN integration and choose Cloudflare.
- Follow Install EdgeComet on Cloudflare automatically. Preflight passes when the root and
wwwrecords are proxied. - Review the static asset folders the homepage scan proposes, then install.
- The install ends with Test request as Googlebot.
If a Worker already runs on your store's hostname, see Add EdgeComet to an existing Cloudflare Worker.
Checkout stays with Shopify
For Shopify O2O, Cloudflare turns off Workers and Snippets on the /checkout path. The EdgeComet Worker does not run there, and bots have no reason to reach checkout pages.
Settings on your zone
- Caching: Cloudflare discourages caching HTML on your zone in O2O, because Shopify caches on its side. EdgeComet keeps bot copies in its own cache and does not need Cloudflare's.
- Firewall: the EdgeComet firewall rule on your zone lets EdgeComet's requests through your rules. Shopify's own protection applies after your zone. See Let EdgeComet through your firewall.
- Bot Fight Mode: no rule can skip it. Turn it off, or use a plan with Super Bot Fight Mode. See Bot Fight Mode.
Shopify's position on Cloudflare proxies
Shopify's help center says that "Cloudflare proxy setups, including Orange-to-Orange, aren't supported", and that issues from them are outside the scope of Shopify Support. Shopify admin can show "Your domain is using a Cloudflare Proxy, which Shopify does not support." See Troubleshooting issues with domains connected to Shopify.
Cloudflare documents O2O as available to all mutual Cloudflare and Shopify customers. For help with your own zone, Cloudflare's guide refers you to your Cloudflare account team or Cloudflare Support.
Check the integration
The install's Test request as Googlebot confirms that EdgeComet answers through your zone. Then watch for the first verified bot visit, usually within 24 hours. See Check that search and AI bots reach EdgeComet.
Remove EdgeComet or O2O
- To remove EdgeComet, click Disconnect on the Cloudflare card. O2O stays on, and your zone passes all traffic to Shopify. See Manage or remove the connection.
- To turn O2O off, switch the store's records to DNS only, or restore the records from Shopify's Connecting a Cloudflare domain to Shopify. Disconnect EdgeComet first: its Worker runs only on proxied records.
If it does not work
No Shopify icon next to the record
O2O is not on for that hostname. Check that the record is a CNAME to shops.myshopify.com and that its proxy status is Proxied.
"The hostname is associated with a held zone"
Shopify reports this when a zone hold on an Enterprise zone blocks the hostname. The zone owner needs to release the hold in Cloudflare for the activation.
The Cloudflare install stops at preflight
A root or www record is still DNS only. Every existing root and www record must be proxied. See Preflight checks.
Test request: "Not confirmed yet"
The Worker is installed, but the test request as Googlebot did not come back from EdgeComet. Bot Fight Mode on your zone, or bot protection after it, can challenge this test because it comes from EdgeComet's servers. See Test request: "Not confirmed yet".