---
schema_version: "1"
id: 02e439ad04232d70b9dddd2294e60c890324d82600731f10e98d42c26e046041
title: Configure an External CDN or Third-Party Proxy
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_configuring_an_external_cdn.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_configuring_an_external_cdn.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: f56b5ef74681a7bbe912960351b03da12c8f8c374e1341fddeeb9b7d1e4a463c
description: 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.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# Configure an External CDN or Third-Party Proxy

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.

Layer your CDN or third-party proxy in front of B2C Commerce. Shopper requests go to your CDN first, then to the embedded CDN, and then to your B2C Commerce instance. To set up this configuration, specify the client IP header and site aliases in Business Manager, and then configure your CDN and DNS.

[Which Salesforce Commerce Product Do I Have?](https://help.salesforce.com/s/articleView?id=commerce.comm_what_product.htm&language=en_US)

To stack a third-party CDN in front of an eCDN zone created with the CDN Zones API, see [CDN Zones](https://developer.salesforce.com/docs/commerce/commerce-api/guide/cdn-zones.html#stack-a-third-party-cdn) in the developer documentation.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png)

Note When fronting wildcard custom hostnames with an external CDN, make sure TXT-based validation is supported and records are propagated. See [Wildcard Custom Hostnames](https://help.salesforce.com/s/articleView?id=cc.b2c_add_wildcard_custom_hostname.htm&release=264.0.0&type=5 "Use a single wildcard custom hostname (for example, *.merchantsite.com) to cover multiple subdomains and reduce onboarding and management overhead in B2C Commerce eCDN via Business Manager.").

1. In Business Manager, click App Launcher ![App Launcher](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/cc/b2c_merchandiser_administrator/images/appLauncher.png), and then select **Merchant Tools** | **site** | **SEO & Discoverability** | **Customer CDN Settings**.
    
    The Customer Content Delivery Network Settings page opens. Customer CDN settings are instance-specific. They aren't transferred to other instances with the Data Replication process.
2. 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, B2C Commerce uses the connection source address. If a CDN terminates client requests, B2C Commerce continues to use the client IP header name functionality.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png)
    
    Note B2C Commerce prohibits use of the following header names, regardless of capitalization or if you replace the dashes with underscores:
    
    - `cf-connecting-ip`
    - `true-client-ip`
    - `x-forwarded-for`
3. Click **Save**.
4. To configure the site name, select **Merchant Tools** | **site** | **SEO & Discoverability** | **Aliases**, and configure the site name.
5. Click **Save**.
6. To use an external CDN with B2C Commerce, after you define the Client IP Header Name and site aliases, complete the configuration on your third-party proxy and DNS.
    1. Enter the B2C Commerce instance as the origin server, for example, `your-domain.cdn.cloudflare.net`.
    2. Pass the host header (for example, www.customer.com) back to the eCDN.
        
        ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png)
        
        Note Don't send the entire B2C Commerce instance (www.customer.com.cdn.cloudflare.net) back to the eCDN.
    3. Configure the client IP header name that you entered in step 2.
    4. Make sure that responses are only cached in the CDN if the origin sends a cache header.
7. In your DNS, point the DNS entry for your site to your `CDN CNAME`.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png)

Note The eCDN security feature can incorrectly identify a third-party proxy as an offending IP address or server and block it, affecting more users than intended. To prevent this, see [Trusted Proxies and eCDN Request Blocking](https://help.salesforce.com/s/articleView?id=cc.b2c_verify_third_party_requests.htm&release=264.0.0&type=5 "When you stack a third-party CDN or proxy in front of B2C Commerce eCDN, the eCDN security feature can mistake the proxy for an attacker and block it. Verify trusted proxy traffic so that legitimate requests aren't blocked."), which describes the recommended options (eCDN custom rules and secret headers) and the not-recommended option (adding a trusted proxy to the firewall allowlist). For allowlist steps, see [Manage IP Address Lists for eCDN Zones](https://help.salesforce.com/s/articleView?id=cc.b2c_manage_trusted_ip_address_lists.htm&release=264.0.0&type=5 "Create named lists of trusted IP addresses or CIDR ranges to use with custom firewall rules that bypass security checks for trusted traffic on your B2C Commerce storefront.").

- **[Trusted Proxies and eCDN Request Blocking](https://help.salesforce.com/s/articleView?id=cc.b2c_verify_third_party_requests.htm&release=264.0.0&type=5)**  
    When you stack a third-party CDN or proxy in front of B2C Commerce eCDN, the eCDN security feature can mistake the proxy for an attacker and block it. Verify trusted proxy traffic so that legitimate requests aren't blocked.