Loading
Prepare for Email to Become the Default Login ExperienceRead More
Extend Salesforce with Clicks, Not Code
Considerations for Custom Domains in Sandboxes

Considerations for Custom Domains in Sandboxes

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.
Applies to: Salesforce Sites and LWR, Aura, and Visualforce sites

Feature Exclusions

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.

 
Loading
Salesforce Help | Article