---
schema_version: "1"
id: dfda1a876ac852f76b8a72c2e96b6159694d84ebbcbfa2c23297dbc0cf3cb9f1
title: Set Up a Custom Domain That Uses the Salesforce CDN
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/community_builder_cdn.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.community_builder_cdn.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: ef76d33e6131c96738ff3149152f5f914f6e7fcd213959fff5cd22f1360f2c9e
description: You can set up the Salesforce content delivery network (CDN) for your custom domain in Experience Builder, Salesforce Tabs, and Visualforce sites. Within each production environment, you can define multiple domains in a sandbox, but only one custom domain associated with a sandbox org can use the Salesforce CDN.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Set Up a Custom Domain That Uses the Salesforce CDN

You can set up the Salesforce content delivery network (CDN) for your custom domain in Experience Builder, Salesforce Tabs, and Visualforce sites. Within each production environment, you can define multiple domains in a sandbox, but only one custom domain associated with a sandbox org can use the Salesforce CDN.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, and <strong>Unlimited</strong> Editions.</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Applies to: <a href="https://help.salesforce.com/s/articleView?id=experience.exp_cloud_basics_glossary.htm&amp;language=en_US" target="_blank">LWR, Aura, and Visualforce sites</a></td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d19163e78">User
              Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d19163e78 ">To create an Experience Cloud site:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d19163e78 ">Create and Set Up Experiences AND View Setup and
              Configuration</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d19163e78 ">To customize an Experience Cloud site:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d19163e78 ">
              <p>Be a member of the site AND Create and Set Up Experiences</p>
              <p>OR</p>
              <p style="margin-bottom:0;">Be a member of the site AND an experience admin, publisher, or
                builder in that site</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d19163e78 ">To publish an Experience Cloud site: </td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d19163e78 ">
              <p>Be a member of the site AND Create and Set Up Experiences</p>
              <p>OR</p>
              <p style="margin-bottom:0;">Be a member of the site AND an experience admin or publisher in
                that site</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d19163e78 ">To add a domain:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d19163e78 ">
              <p>Manage Custom Domains</p>
              <p>OR</p>
              <p style="margin-bottom:0;">View Setup and Configuration plus either a Site.com Publisher
                license or Create and Set Up Experiences</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d19163e78 ">To edit a domain:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d19163e78 ">Manage Custom Domains</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d19163e78 ">To add, edit, and delete custom URLs:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d19163e78 ">
              <p>Manage Custom Domains</p>
              <p>OR</p>
              <p style="margin-bottom:0;">View Setup and Configuration AND either Create and Set Up
                Experiences OR a Site.com Publisher license</p>
            </td>

          </tr>
        </tbody>
      </table>

Before you add a custom domain that serves your Experience Cloud site with the Salesforce CDN, review these important considerations.

- To minimize disruption for your users, provision and activate our CDN when your site traffic is low.
- To create or activate a custom domain for testing in a sandbox, log in to the production org that owns the sandbox and go to the Domains Setup page.
- With this option, Salesforce hosts your domain with one of Salesforce’s CDN partners. If a third party hosts your domain or if you use a third-party CDN or a web-application firewall (WAF), see [Use a Third-Party Service or CDN to Serve Your Custom Domain](https://help.salesforce.com/s/articleView?id=platform.domain_mgmt_external_host.htm&release=264.0.0&type=5 "Use a domain that’s hosted by a third-party service to serve your Experience Cloud sites or Salesforce Sites. These third-party services include third-party hosts, web application firewalls (WAFs), and non-Salesforce content delivery networks (CDNs).").
- When updating Domain Configuration Options for a domain, avoid selecting **Serve the domain with the Salesforce Content Delivery Network (CDN)**, then selecting the checkbox **Use the Salesforce CDN for Commerce LWR sites or sites hosted on Experience Delivery** more than 2 times in one week as it may cause domain onboarding delays.
- Salesforce partners with CDN providers to optimize our content delivery network. If you have an existing domain hosted outside of Salesforce, such as www.example.com, and that domain isn’t currently registered with the Salesforce CDN partner that will serve your domain, moving to the Salesforce CDN is a two-step process. First, set up a custom domain that points to our CDN partner as a third-party CDN. See [Use a Third-Party Service or CDN to Serve Your Custom Domain](https://help.salesforce.com/s/articleView?id=platform.domain_mgmt_external_host.htm&release=264.0.0&type=5 "Use a domain that’s hosted by a third-party service to serve your Experience Cloud sites or Salesforce Sites. These third-party services include third-party hosts, web application firewalls (WAFs), and non-Salesforce content delivery networks (CDNs)."). Then [change the HTTPS option](https://help.salesforce.com/s/articleView?id=platform.domain_mgmt_change_service.htm&release=264.0.0&type=5 "Change the method for serving your domain. For example, switch from a third-party service or content delivery network (CDN) to the Salesforce CDN. Update your domain in Salesforce to use a different third-party service or CDN to serve your site. Or update a temporary non-HTTPS domain to use HTTPS as required by Salesforce.") for that custom domain to the Salesforce CDN.
- This option is unavailable for Salesforce Sites and for registrable domains, such as example.com without the www subdomain. To serve a registrable domain or a Salesforce Site with a CDN, see [Use a Third-Party Service or CDN to Serve Your Custom Domain](https://help.salesforce.com/s/articleView?id=platform.domain_mgmt_external_host.htm&release=264.0.0&type=5 "Use a domain that’s hosted by a third-party service to serve your Experience Cloud sites or Salesforce Sites. These third-party services include third-party hosts, web application firewalls (WAFs), and non-Salesforce content delivery networks (CDNs).").
- You don’t have to create a custom domain to test the Salesforce CDN in a sandbox. You can also use the system-managed \*.sandbox.my.site.com Experience Cloud URL, which uses our CDN partner, to serve your content with the Salesforce CDN in sandboxes.

Before you activate this feature, read the [considerations](https://help.salesforce.com/s/articleView?id=platform.community_builder_cdn_considerations.htm&release=264.0.0&type=5 "If you host public-facing, cacheable content on your Experience Cloud sites, we recommend that you use the Salesforce content delivery network (CDN) to greatly improve load times.") and complete the [prerequisites](https://help.salesforce.com/s/articleView?id=platform.community_builder_cdn_prerequisites.htm&release=264.0.0&type=5 "Before you set up a custom domain that uses the Salesforce content delivery network (CDN), complete these steps.") for the Salesforce CDN. Then complete the [custom domain prerequisites](https://help.salesforce.com/s/articleView?id=platform.domain_mgmt_prereqs.htm&release=264.0.0&type=5 "Before you serve your site content with a custom domain, register a domain. To get that domain ready to serve your site content, update the Domain Name System (DNS) record to point to your org. Review your site URLs for potential conflicts, and complete the prerequisites for your chosen domain configuration option.").

1. On your DNS provider’s site, verify that the two required canonical name (CNAME) records exist for your domain and the \_acme-challenge subdomain. See [Point Your Custom Domain to Your Salesforce Org](https://help.salesforce.com/s/articleView?id=platform.domain_mgmt_update_dns.htm&release=264.0.0&type=5 "Before you add a domain in Salesforce, point your domain to your Salesforce org in Domain Name Service (DNS). If your custom domain uses your HTTPS Certificate or the Salesforce content delivery network (CDN) partner, add a canonical domain name (CNAME) record for your fully qualified domain (FQDN) to DNS. The CNAME record references your Salesforce org ID and your FQDN. Then, if you plan to use the Salesforce CDN to serve your Experience Cloud site on your custom domain, add a second CNAME record that our CDN partner requires.").
2. From Setup, in the Quick Find box, enter Domains, and then select **Domains**.
3. Select **Add a Domain**.
4. Enter the domain name.
    
    Salesforce validates ownership based on the fully qualified domain name (FQDN) that you enter when you add a domain to your org. If you get an error message, [point your custom domain to your org](https://help.salesforce.com/s/articleView?id=platform.domain_mgmt_update_dns.htm&release=264.0.0&type=5 "Before you add a domain in Salesforce, point your domain to your Salesforce org in Domain Name Service (DNS). If your custom domain uses your HTTPS Certificate or the Salesforce content delivery network (CDN) partner, add a canonical domain name (CNAME) record for your fully qualified domain (FQDN) to DNS. The CNAME record references your Salesforce org ID and your FQDN. Then, if you plan to use the Salesforce CDN to serve your Experience Cloud site on your custom domain, add a second CNAME record that our CDN partner requires."), and then wait for the changes to propagate. After you update your domain’s DNS record, it can take up to 20 hours for that change to take effect worldwide.
5. For orgs launching Commerce LWR sites or sites hosted on Experience Delivery, select the Domain Configuration option, **Serve the domain with the Salesforce Content Delivery Network (CDN)**, then select the checkbox **Use the Salesforce CDN for Commerce LWR sites or sites hosted on Experience Delivery**. With this option, your domain uses a single certificate which displays only one host name. Five branded certificates are available for use with the Salesforce CDN partner and unlimited traffic are available. Contact your account representative if you need additional certificates. You can’t use the same domain name across multiple organizations. If you delete a domain name from one organization and plan on reusing it in another, wait at least 48 hours between deleting the domain name and adding it back in.
6. For all other digital experiences using Experience Cloud, Commerce, or Industries licenses, select the Domain Configuration Option **Serve the domain with the Salesforce Content Delivery Network (CDN)**. With this option, your domain uses a single certificate, which displays only one host name. Ten branded certificates for use with the Salesforce CDN partner and 48 terabytes of traffic per year are available for Experience Cloud licenses that adopt a single certificate CDN. If you need more certificates, contact your account representative.
    
    Here’s the Domain page when you select this domain configuration option.
    
    ![Domain page when adding a custom domain that uses the Salesforce CDN.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/extend_click/images/cdn_domain_config_options.png)
    
    The top of the page includes your 18-digit org ID and the format for the CNAME in DNS to point your domain to your org (1). When you select the option to serve your domain with the Salesforce CDN, additional guidance includes the targets for both CNAME records in DNS (2). Replace `[domain]` with your domain name, such as www.example.com.
7. For Associated Org, select the org from which you want this custom domain to serve site content.
    
    For example, to serve the sites in your production org, select **Production**. Or select a sandbox where you want to test this custom domain.
    
    This field only appears in production orgs with associated sandboxes. You can edit this field only from production orgs. For more information, see [Test Your Custom Domains in a Sandbox](https://help.salesforce.com/s/articleView?id=platform.domain_mgmt_sandbox_custom_domains.htm&release=264.0.0&type=5 "Develop and test your custom domains that serve content from your Experience Cloud sites and Salesforce Sites in a sandbox before you activate the domain in production.").
8. Save your domain.
    
    After you save your new domain, Salesforce provisions the domain or gets it ready to be used. The Salesforce CDN provisioning process can take up to 24 hours. When that process is complete, the domain’s status on the Domains Setup page changes from Provisioning to Awaiting Activation and you receive an email.
    
    Newly created custom domains use HTTP, not HTTPS, until you activate the domain.
9. To activate your domain, on the Domains Setup page, select **Activate** next to your custom domain name. Domains pending activation for more than 30 days are automatically cancelled. If an activation is canceled, edit or create your domain again, make sure the associated the CDN partner is Cloudflare, and begin the activation process again.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_note.png)
    
    Note Custom domains in a sandbox are edited and activated in production.
    
    Your site can be unavailable for 5–10 minutes, so activate your custom domain when your site traffic is low. When your site is active, the status changes from Awaiting Activation to Completed, and the Current Domain Configuration Option changes to the Salesforce CDN partner.
10. To serve your sites via your activated domain, [add a custom URL](https://help.salesforce.com/s/articleView?id=platform.custom_url_add.htm&release=264.0.0&type=5 "To specify the site to load when users access your custom domain, add a custom URL. Optionally, you can define additional relationships between your domains and sites by mapping paths for your domain to your sites.").
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_note.png)
    
    Note For your domain to serve your site, at least one custom URL is required.
    
    Changing the Salesforce CDN affects SAML Single Sign-On Settings for all custom URLs in that domain. Reconfirm the SAML Single Sign-On Settings for each HTTPS custom URL in that domain after activating a change. Login Settings are available in **Experience Workspaces** | **Administration** | **Login & Registration.**
11. To avoid vulnerabilities during HTTP redirects, [enable HTTP Strict Transport Security (HSTS) preloading](https://help.salesforce.com/s/articleView?id=platform.domain_mgmt_hsts_preloading.htm&release=264.0.0&type=5 "As a security best practice, enable and submit your custom domain for HTTP Strict Transport Security (HSTS) preloading. Connections can be vulnerable when HTTP requests are redirected to HTTPS. An example is a user attempting to access your custom domain using the HTTP protocol. By adding your registrable domain to the third-party HSTS preload list, supported browsers always use HTTPS, protecting your users from attacks during those HTTP redirections.") on the registrable domain for your custom domain.
    
    HSTS preloading ensures that HTTPS connections are always used in supported browsers. Configure this option by adding an HTTP header on the registrable domain for your custom domain. For example, if your custom domain is https://shop.example.com, you add the header to https//example.com. Because the Salesforce CDN doesn’t support registrable domains, Salesforce can’t configure this header for you, and the Allow HSTS preloading registration option has no effect.

This diagram shows the routing of traffic when Salesforce serves your custom domain with the Salesforce CDN. Dotted lines (![dotted line](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/extend_click/images/arrow_dotted.png)) represent DNS configurations, and the solid line (![solid line](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/extend_click/images/arrow_solid.png)) represents user traffic flow through HTTPS. The gray lines represent traffic that originates outside Salesforce, and the blue line represents traffic that originates in Salesforce. In this example, the domain name is www.example.com and the 18-digit org ID is 00d000000000000013.

![Connectivity diagram for domains that serve your Experience Cloud site content with the Salesforce CDN.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/extend_click/images/custom_domain_salesforce_cdn.png)

With your DNS provider, you point your custom domain (1) to the Salesforce internal CNAME (2), which includes your org ID. Within Salesforce, user traffic is routed to the Salesforce CDN partner (3), which acts as an intermediary for your Salesforce content (4).

#### See Also

- [Custom Domains](https://help.salesforce.com/s/articleView?id=platform.domain_mgmt.htm&release=264.0.0&type=5 "Provide a branded experience for users who access your external-facing Salesforce content by serving your Digital Experiences or Salesforce Sites on a domain that you own, such as https://www.example.com.")
- [Serve Your Experience Cloud Site with the Salesforce Content Delivery Network (CDN)](https://help.salesforce.com/s/articleView?id=platform.domain_mgmt_salesforce_cdn.htm&release=264.0.0&type=5 "Optimize page load times and site performance with our content delivery network. Salesforce partners with a content delivery network (CDN) provider to efficiently deliver publicly cacheable content to users on your Experience Cloud sites. We recommend the Salesforce CDN for custom domains that serve Digital Experiences, including Experiences built with Experience Cloud, Commerce, and Industries licenses.")
- [View and Edit Single Sign-On Settings](https://help.salesforce.com/s/articleView?id=xcloud.sso_saml_detail.htm&type=5&language=en_US)