Use EdgeComet on Salesforce Commerce Cloud with Cloudflare O2O
A Salesforce Commerce Cloud (SFCC) storefront connects to EdgeComet through your own Cloudflare zone. With Cloudflare's O2O setup, also called orange-to-orange, requests to your storefront pass your Cloudflare zone first and then the SFCC embedded CDN (eCDN). 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. One extra step on the SFCC side lets EdgeComet's own requests through the eCDN.
Cloudflare documents O2O for SFCC with two requirements: an SFCC Proxy Zone, and your own Cloudflare zone on an Enterprise plan.
What O2O is
The SFCC eCDN runs on Cloudflare. O2O puts your own Cloudflare zone in front of it: the settings of your zone apply to the traffic first, then the eCDN's.
O2O turns on per hostname, when your zone holds a proxied CNAME record to the eCDN target that SFCC Business Manager shows, such as commcloud.prod-abcd-example-com.cc-ecdn.net. There is no separate switch.
The EdgeComet Worker on your zone sends crawler page requests to EdgeComet. Everything else goes on to the eCDN and your storefront. When EdgeComet needs a fresh copy, its request passes your zone and the eCDN like any other request.
What you get
- Every bot request on record. EdgeComet records each Googlebot, Bingbot, GPTBot, ClaudeBot and ChatGPT-User request, with the page it received, and keeps the data while your subscription is active. Reports, alerts and the site audit read it with no log pipeline to run. See Log Analyzer.
- Pre-cached pages for bots. Bots get current copies of product and category pages from EdgeComet's cache, refreshed on your schedule. See Cache.
- Rendering for content added by JavaScript, for bots that do not run JavaScript. See Choose a serving mode.
- SEO changes without a code release. Edge SEO changes titles, meta descriptions, canonicals, structured data and redirects in the HTML bots receive. See Edge SEO.
- Your own Cloudflare services in front of the storefront. Cloudflare's SFCC guide names the benefit of O2O as applying your own zone's services and settings, such as WAF, Bot Management and Waiting Room, to the traffic for your storefront.
For catalog, product feed and listing reports, see Shelf Edge.
Before you start
- An SFCC Proxy Zone for the storefront. In Business Manager, open Administration > Sites > Embedded CDN Settings and find the hostname. A CNAME that starts with
commcloudmeans a proxy zone. A Legacy Zone cannot use O2O: migrate it first. See Salesforce's Proxy Zone Migration Overview. - Your own Cloudflare zone for the domain on an Enterprise plan, in a different Cloudflare account from the eCDN.
- A website for the storefront's domain in EdgeComet. See Add your first website.
- Access to Business Manager and the Cloudflare zone, or the people who manage them.
Connect the storefront to your Cloudflare zone
- In Business Manager, open Administration > Sites > Embedded CDN Settings and copy the CNAME value of the storefront hostname, such as
www.example.com. - In Cloudflare, open your domain's DNS > Records.
- Set the storefront hostname's record to Type
CNAME, Target the value you copied, Proxy status Proxied. - Repeat for every storefront hostname. Point each record at the SFCC CNAME directly, never at another proxied record in your zone that points to it.
| Type | Name | Target | Proxy status |
|---|---|---|---|
CNAME | www | commcloud.prod-abcd-example-com.cc-ecdn.net | Proxied |
The target has three parts: the environment (prod, dev or stg), your SFCC realm ID, and your domain name with hyphens.
The root domain
Salesforce does not support pointing the root domain, such as example.com, at B2C Commerce, and asks you to redirect it to a subdomain. On Cloudflare, keep a proxied record for the root and redirect it to www with a redirect rule, as in Cloudflare's Redirect from root to WWW example.
The EdgeComet install needs every root and www record that exists to be Proxied. A root record left as DNS only stops the install at preflight.
Recommended zone settings
Cloudflare's SFCC guide recommends four settings on your zone for the storefront hostnames:
- Minimum TLS Version set to TLS 1.2, under Edge Certificates.
- Security Level matched to the level set in SFCC Business Manager.
- Browser Integrity Check turned off, for example with a Configuration Rule on the SFCC hostnames.
- A Cache Rule that bypasses cache on the SFCC hostnames, which avoids caching in both your zone and the eCDN.
The cache bypass does not affect EdgeComet: it keeps bot copies in its own cache, not in Cloudflare's.
Install EdgeComet on the zone
- In EdgeComet, open Configuration > Connections > CDN integration and choose Cloudflare.
- Follow Install EdgeComet on Cloudflare automatically. The EdgeComet firewall rule lets its requests through the security rules on your zone.
- Review the static asset folders the homepage scan proposes, then install.
If a Worker already runs on your storefront's hostname, see Add EdgeComet to an existing Cloudflare Worker.
Let EdgeComet through the eCDN
EdgeComet's own page requests pass your zone and then the eCDN. Salesforce notes that eCDN security can mistake a proxy in front of it for an attacker and block it, and recommends eCDN custom rules that trust a secret request header.
Add an eCDN custom rule for the storefront zone that allows requests whose X-Render-Key header equals your site's render key, and skips the eCDN security checks for them. Every page request EdgeComet sends carries this header.
Use the key from the EdgeComet setup guide, and treat it like a password. See The render key.
For where to add custom rules in Business Manager or with the CDN API, see Salesforce's Trusted Proxies and eCDN Request Blocking.
Check the integration
The install's Test request as Googlebot confirms that EdgeComet answers through your zone. Then check that EdgeComet can fetch pages through the eCDN: open a product page in Page Analysis after the first bot visit, or run the render check on Getting started. 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. See Manage or remove the connection.
- To turn O2O off, switch the storefront records to DNS only, as Salesforce's DNS mapping steps describe. Disconnect EdgeComet first: its Worker runs only on proxied records. Keep the records pointed at the eCDN for as long as you use SFCC.
If it does not work
The render check or the first pages fail with 403
The eCDN blocked EdgeComet's request. Add the eCDN custom rule for X-Render-Key, then retry the render check.
"The hostname is associated with a held zone"
A zone hold on your Enterprise zone blocks the custom hostname at the eCDN. The zone owner needs to release the hold in Cloudflare for the activation.
SSL errors on the storefront hostname
Cloudflare's guide suggests checking for a CAA record that blocks the certificate authority, with dig +short example.com CAA.
The Cloudflare install stops at preflight
A root or www record is still DNS only. See The root domain and Preflight checks.