Loading

Including domain metadata in the deployment package will change the HTTPS option of the custom domain to 'No HTTPS'

Udgivelsesdato: Jun 14, 2026
Beskrivelse

When a Salesforce Sandbox is refreshed from Production, the CustomSite metadata copied to the sandbox contains a reference to the production domain but is missing the <certificate> element. When this incomplete CustomSite metadata is later deployed to any environment (sandbox or production), Salesforce changes the domain's HTTPS option from 'Salesforce Cloud' to 'No HTTPS (Temporary)'.
The incomplete metadata element looks like this (notice the missing <certificate> element):
<customWebAddresses> <domainName>your-custom-domain</domainName> <primary>true</primary> </customWebAddresses>
A complete metadata element with the certificate element included would look like:
<customWebAddresses> <certificate>certificate-unique-name</certificate> <domainName>www.testing123.com</domainName> <primary>true</primary> </customWebAddresses>

Løsning

Use one of the following options to prevent or recover from this issue.

Option 1 (Preferred): Exclude CustomSite Metadata from Deployments Without Changes

Domain metadata in lower environments are copies of the production domain configuration. They exist only because the sandbox was refreshed from production.
If the CustomSite metadata does not contain any changes that need to be deployed, remove it from your deployment package entirely. After deployment, correct the domain HTTPS option to the intended setting as a post-deployment step.

Option 2: Add the Certificate Element to the CustomSite Metadata

If you must deploy the CustomSite metadata, add the <certificate> element to the <customWebAddresses> block in your deployment package before deploying:
Add the <certificate> element with the certificate unique name, the <domainName> element with your custom domain, and <primary>true</primary> within the <customWebAddresses> block.
Then deploy the updated metadata to your affected sandbox.
Important: The certificate used for the domain must match the Common Name (CN) or Subject Alternative Names (SANs) of the Production certificate. Self-signed certificates will not work. To obtain a valid certificate, either refresh the sandbox from Production to receive a copy of the Production certificates, or import the original JKS certificate.

Yderligere ressourcer
Vidensartikelnummer

000396704

 
Indlæser
Salesforce Help | Article