If you purchase a new production org, your old org continues to serve your sites with your custom domain. To move the domain to your new org, set up the domain, and then delete the domain in your old org. Or if you have multiple production orgs, you can move an existing domain to an org of your choice.
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 |
| User Permissions Needed | |
|---|---|
| To view a domain: |
Manage Custom Domains OR View Setup and Configuration |
| To add a domain: |
Manage Custom Domains OR View Setup and Configuration plus either a Site.com Publisher license or Create and Set Up Experiences |
| To edit or delete a domain: | Manage Custom Domains |
| To add, edit, and delete custom URLs: |
Manage Custom Domains OR View Setup and Configuration AND either Create and Set Up Experiences OR a Site.com Publisher license |
To move a custom domain from one production org to another production org, complete these steps.
If you set up a custom domain in a sandbox and want to move that domain to production, see Activate a Sandbox Custom Domain in Production.
Prepare the Custom Domain
Keep your website up and running while you prepare to move your domain. Configure the domain in the new production org, but don’t activate it yet.
- Verify that the Experience Cloud sites, Salesforce Sites, and corresponding pages exist in the new org. If not, move them to the new org.
-
To configure your custom domain in the new org, add a temporary non-HTTPS domain.
With a temporary non-HTTPS domain, your existing domain keeps serving your sites while you configure the domain and custom URLs in the new org.
You can’t add the same domain to two orgs on the same Salesforce instance. If your new org is on the same instance as your old org, contact Salesforce Customer Support to move the org to another instance.
-
Complete the prerequisites for your selected domain configuration option to serve the
domain.
- To serve your domain with your HTTPS certificate on Salesforce servers, complete the prerequisites for that option.
- To serve your Digital Experiences with the Salesforce content delivery network (CDN), complete the prerequisites for the Salesforce CDN.
- To use a third-party service or CDN to serve your domain, complete the prerequisites for that option. These third-party services include third-party hosts, web application firewalls (WAFs), and non-Salesforce CDNs.
- Add custom URLs for your temporary non-HTTPS domain.
Activate the Domain in the New Org
When you’re ready, activate it in the new org.
-
If necessary, update the DNS record of your domain. To complete these steps, work
with your DNS provider or third-party provider.
-
Reduce the Time to Live (TTL) of your domain in DNS. Use a small value, such as
300, for 300 seconds or 5 minutes.
Think of your TTL as a timer for calls to your domain. This value tells servers how long to cache or keep a web page before calling DNS again to refresh the page. When you temporarily reduce this value, you minimize the chance of your users calling the previous IP address during the move.
After you make this change, wait for the time duration of the previous TTL before you make other changes to DNS.
- If you serve your domain with your HTTPS certificate on Salesforce servers or with the Salesforce CDN, update the canonical name (CNAME) record to point to your new org.
- If a third-party service or CDN serves your domain, work with your third-party provider to use your target host name to forward requests to your domain to your new org.
After you update your DNS record, the changes are updated across the internet. That process, called DNS propagation, typically takes a few hours, but it can take up to 72 hours. -
Reduce the Time to Live (TTL) of your domain in DNS. Use a small value, such as
300, for 300 seconds or 5 minutes.
- From Setup in production, in the Quick Find box, enter Domains, and then select Domains.
- For your existing temporary non-HTTPS domain, click Edit.
-
Select your domain configuration option.
- If you have a certificate authority (CA)-signed certificate that uses Certificate and Key Management for your domain, select Serve the domain with your HTTPS certificate on Salesforce servers. Then select the certificate to serve the domain.
-
To use the Salesforce CDN partner to host an Experience Cloud site on your custom
domain, select Serve the domain with the Salesforce Content Delivery
Network (CDN).
If you use Marketing Cloud Account Engagement (Pardot) in a Professional Edition org, the Salesforce CDN is the only domain configuration option available for your custom domains.
This option is unavailable for registrable domains such as example.com without the www subdomain, and for Salesforce Sites. To serve a registrable domain or a Salesforce Site on a CDN, serve your custom domain with a third-party service or CDN.
For more information and important considerations about the Salesforce CDN, see Serve Your Experience Cloud Site with the Salesforce Content Delivery Network (CDN).
- If a third-party service or CDN serves your domain, select Use a third-party service or CDN to serve this domain, and then enter the external host name.
-
If your domain is a registrable domain such as https://example.com, to avoid
vulnerabilities during HTTP redirects and to have supported web browsers always use
secure HTTPS connections for your domain, select Allow HSTS preloading
registration.
This setting adds the preload directive to the HSTS header. After you enable this setting, submit your domain at https://hstspreload.org. For more information, including how to enable HSTS preloading for a domain with a subdomain, see Enable HSTS Preloading on a Custom Domain.
-
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.
-
Save your domain.
When you save a domain that uses your HTTPS certificate on Salesforce servers, the status of the domain on the Domain Setup page changes to Awaiting Activation.
When you save a domain that uses another domain configuration option, Salesforce provisions the domain in your new org. Provisioning can take up to 14 hours for the Salesforce CDN and up to 8 hours for other domain configuration options. During provisioning, your site can be inaccessible and your site visitors can experience errors.
When the provisioning process is complete, the status of the domain on the Domains Setup page changes to Awaiting Activation and you receive an email.
-
To serve your sites via your domain, add a custom URL.
When you add the first custom URL for a domain that uses your HTTP certificate on Salesforce servers, Salesforce provisions the domain. In other words, Salesforce gets it ready. The provisioning process can take 4–14 hours. When that process is complete, the domain’s status on the Domains Setup page changes from Awaiting Custom URL to Awaiting Activation and you receive an email.
-
To activate your updated domain, on the Domains Setup page, click
Activate next to your custom domain.
Newly created custom domains use HTTP, not HTTPS, until you activate the domain.
Your site can be unavailable for 5–10 minutes after activation, so activate your custom domain when your site traffic is low. When your site is active, the status changes from Awaiting Activation to Completed.
Clean Up References to the Old Domain
To prevent issues and potential outages, remove references to the old org in Salesforce and DNS.
-
Delete the domain in your
old production org.
ImportantWhile the domain exists in two orgs, these issues can occur.
- Users can be routed to the old IP address and experience errors or view outdated content.
- When someone deletes the old org, parts of the Salesforce-owned configuration for the custom domain are deleted, too. That deletion causes an outage for the custom domain in the new org.
-
When your updated domain is live, remove any temporary configuration in Salesforce
and DNS.
- Work with your DNS provider or third-party service provider to reset the TTL of your domain in DNS to your previous setting.
- Delete any temporary non-HTTPS domains that are no longer needed.
- In DNS, delete the TXT records that you added to set up the temporary domain.