Configure an External CDN or Third-Party Proxy
You can use your own content delivery network (CDN) with Salesforce B2C Commerce's embedded CDN to deliver static and dynamic content to your customers. Deploy your CDN (or a reverse proxy) in front of B2C Commerce to improve performance and security, or to provide extra functionality using your CDN.
Required Editions
| Available in: B2C Commerce |
Customer CDN settings are instance-specific. They aren’t transferred to other instances with the Data Replication process.
Layer your CDN in front of the B2C Commerce platform. Specify the URL prefix used to create the URLs pointing to your CDN.
-
In Business Manager, click App Launcher
, and then select Merchant Tools |
site
| SEO & Discoverability | Customer CDN Settings.
The Customer Content Delivery Network Settings page opens. -
In the Dynamic Content section, enter the Client IP Header Name.
The CDN uses the Client IP Header value to transfer the client's IP address to enable client IP-based services, such as geo-location. B2C Commerce uses this setting to retrieve the client IP address from a request header instead of the network connection source address. If the request header isn't provided, the connection source address is used. If a CDN terminates client requests, B2C Commerce continues to use the client IP header name functionality.
-
In Business Manager, click App Launcher
, and then select Merchant Tools |
site
| SEO & Discoverability | Aliases and configure
the site name.
- Click Save (at the top right).
- Use the CDN Zones API custom rules (per zone) to selectively skip WAF, other custom rules, rate limits, or security levels for specified third-party IP addresses.
- Add your stacked proxy to the firewall allowlist using the CDN Zones API custom rules. See Add Stacked Proxy to the Firewall Allowlist. This method isn't recommended.
- Verify third-party requests with Secret Headers
After defining the Client IP Header Name and site aliases, complete the configuration by configuring your DNS and your external third-party proxy.
To configure a third-party proxy on top of the B2C Commerce platform:
- On the third-party proxy:
- Enter the B2C Commerce instance as the origin server, for example,
your-domain.cdn.cloudflare.net - Pass the host header (for example, www.customer.com) back to the
eCDN.
Note Don’t send the entire B2C Commerce instance (www.customer.com.cdn.cloudflare.net) back to the eCDN. - Configure the client IP header name as specified.
- Ensure that responses are only cached in the CDN if the origin sends a cache header.
- Enter the B2C Commerce instance as the origin server, for example,
- On the DNS, point the DNS entry for your site to your
CDN CNAME.
- Add Stacked Proxy to the Firewall Allowlist
You can use the CDN Zones API custom rules to selectively skip the WAF, other custom rules, rate limits, or security levels for third-party IP addresses that you specify. - Verify Third-Party Requests with Secret Headers
You can use secret headers as an alternative to maintaining the firewall allowlist for verified third-party servers. A secret header is an extra HTTP header typically attached at the CDN level.

