Determine whether you can set up a custom domain in your sandbox, and review
considerations for using a content delivery network (CDN) with a custom domain in a sandbox.
Learn how to prevent errors when you refresh, clone, or delete a sandbox associated with a
custom domain.
Required Editions
Available in: both Salesforce Classic and Lightning Experience
Available in: Enterprise, Performance, and Unlimited
Editions.
In each production environment, you can define multiple sandbox custom domains, but only
one custom domain associated with a sandbox org can use the Salesforce content delivery
network (CDN).
Third-party CDNs are supported only if the CDN configuration meets the prerequisites.
Sandbox Refreshes from Production
When you refresh a sandbox from its owning production Salesforce org, the custom domain
remains associated with the sandbox in a provisioned but inactive state. After you activate
the refreshed sandbox, log in and validate the sandbox Salesforce Sites and Experience Cloud
sites domains from the Custom URLs Setup page.
Cloning a Sandbox
You can create a sandbox by cloning an existing sandbox rather than using your production
org as the source. When you activate a cloned sandbox, any custom domains associated with
the sandbox remain associated with the inactive source sandbox. Until the custom domain is
associated with the cloned sandbox again, calls to the custom domain return an error.
To associate your custom domain with the cloned sandbox, after the cloned sandbox is
activated, log in to your production org. From the Domains Setup page, edit the custom
domain, and change the associated org to an org other than your sandbox. Save your changes,
and then activate the domain. Then edit the custom domain again, and update the associated
org to your sandbox. Save and activate your domain.
After you reactivate the custom domain for your sandbox, log in to the sandbox and validate
the sandbox Salesforce Sites and Experience Cloud sites domains from the Custom URLs Setup
page.
Custom Domains That Point to a Sandbox Experience Builder Site
After you refresh or clone a sandbox, republish your sandbox Experience Builder sites.
Calls to a custom domain that points to an Experience Builder site return an error until you
publish the site.
Deleting a Sandbox
Before you delete a sandbox, log in to production and associate any custom domains for that
sandbox with a different org. If you don’t update the domain in production, calls to the
custom domain URL return an error.
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.